Skip to content
Commit d944f0b1 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Jonathan Corbet
Browse files

docs: driver-model: device: Add DEVICE_ATTR_{RO,RW} examples



bus.rst, driver.rst, and hwmon-kernel-api.rst refer to the
DEVICE_ATTR_* macros for devices, but device.rst does not mention them.

Add a paragraph about these helper macros, and use them in the examples.
Retain the old description, as it is still useful for less common values
of mode.  Change the names of the example "show" and "store" methods, to
match the expectations of the DEVICE_ATTR_* macros.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210303133845.3939403-2-geert+renesas@glider.be


Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 0e2c578c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment