Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527753 > unrolled thread

[PATCH] driver core: add CLASS_ATTR_WO()

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-11-22 18:40 +0100
Last post2016-11-22 18:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] driver core: add CLASS_ATTR_WO() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-22 18:40 +0100

#1527753 — [PATCH] driver core: add CLASS_ATTR_WO()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-22 18:40 +0100
Subject[PATCH] driver core: add CLASS_ATTR_WO()
Message-ID<sGnd0-1Py-29@gated-at.bofh.it>
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,

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web