summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-22 18:31:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-24 16:08:13 +0100
commit2027cbcf497579cb3bd71ed4173ae9b950aa09a3 (patch)
tree6eb5a2986301b21918ef9a3773503b6d2b1b9edc /include/linux/device.h
parentdfea747d2aba77443acf7ce6fa37caa729bd034c (diff)
driver core: add CLASS_ATTR_WO()
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>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 49f453892ca5..4264caacebb9 100644
--- 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,