* [PATCH] driver core: add CLASS_ATTR_WO()
@ 2016-11-22 17:31 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2016-11-22 17:31 UTC (permalink / raw)
To: linux-kernel
Some class subsystems are open-coding CLASS_ATTR_WO because the driver
core never provided it. Add the macro to device.h so that we can go
around and fix up the individual subsystems as needed.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/device.h | 2 ++
1 file changed, 2 insertions(+)
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -465,6 +465,8 @@ struct class_attribute {
struct class_attribute class_attr_##_name = __ATTR_RW(_name)
#define CLASS_ATTR_RO(_name) \
struct class_attribute class_attr_##_name = __ATTR_RO(_name)
+#define CLASS_ATTR_WO(_name) \
+ struct class_attribute class_attr_##_name = __ATTR_WO(_name)
extern int __must_check class_create_file_ns(struct class *class,
const struct class_attribute *attr,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-22 17:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-22 17:31 [PATCH] driver core: add CLASS_ATTR_WO() Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.