diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-11 15:20:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-16 12:47:28 +0200 |
commit | 8514c470dc18e58f27dee10a787175ef8f31162f (patch) | |
tree | 9bf6547db8ff51aa98dbf14a26c2974c1ca3f872 /include/linux/device.h | |
parent | a75e78f21f9ad4b810868c89dbbabcc3931591ca (diff) | |
download | lwn-8514c470dc18e58f27dee10a787175ef8f31162f.tar.gz lwn-8514c470dc18e58f27dee10a787175ef8f31162f.zip |
driver core: add BUS_ATTR_WO() macro
Many bus attributes are write-only, so provide a simple macro for that
to be able to match the other driver core attribute macros.
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 8f882549edee..767cf1938b14 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -55,6 +55,8 @@ struct bus_attribute { struct bus_attribute bus_attr_##_name = __ATTR_RW(_name) #define BUS_ATTR_RO(_name) \ struct bus_attribute bus_attr_##_name = __ATTR_RO(_name) +#define BUS_ATTR_WO(_name) \ + struct bus_attribute bus_attr_##_name = __ATTR_WO(_name) extern int __must_check bus_create_file(struct bus_type *, struct bus_attribute *); |