diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-11 15:20:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-11 15:20:32 +0200 |
commit | f238f7a7059c7a683f53480e455274b93d94de93 (patch) | |
tree | f50dfcfdc44bf4bd88cb8150018be918c45bd1da | |
parent | d6ff1b52b569dc12ba5be027bc6c22f4ac0f4ce1 (diff) | |
download | staging-f238f7a7059c7a683f53480e455274b93d94de93.tar.gz |
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.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 055a69dbcd18a..b486249bcab5c 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 *); |