Skip to content

Commit 2027cbc

Browse files
committed
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>
1 parent dfea747 commit 2027cbc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/linux/device.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ struct class_attribute {
465465
struct class_attribute class_attr_##_name = __ATTR_RW(_name)
466466
#define CLASS_ATTR_RO(_name) \
467467
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)
468470

469471
extern int __must_check class_create_file_ns(struct class *class,
470472
const struct class_attribute *attr,

0 commit comments

Comments
 (0)