Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2
+2
include/linux/device.h
··· 465 465 struct class_attribute class_attr_##_name = __ATTR_RW(_name) 466 466 #define CLASS_ATTR_RO(_name) \ 467 467 struct class_attribute class_attr_##_name = __ATTR_RO(_name) 468 + #define CLASS_ATTR_WO(_name) \ 469 + struct class_attribute class_attr_##_name = __ATTR_WO(_name) 468 470 469 471 extern int __must_check class_create_file_ns(struct class *class, 470 472 const struct class_attribute *attr,