#define ATTR_DECLARE( NAME ) \ static struct kobj_attribute NAME##Attr = { \ .attr = { .name = __stringify(NAME), .mode = 0666 }, \ .show = NAME##Show, \ .store = NAME##Store, \ }; #define ATTR_DECLARE_RO( NAME ) \ static struct kobj_attribute NAME##Attr = { \ .attr = { .name = __stringify(NAME), .mode = 0444 }, \ .show = NAME##Show, \ .store = NULL, \ }; #define ATTR_DECLARE_WO( NAME ) \ static struct kobj_attribute NAME##Attr = { \ .attr = { .name = __stringify(NAME), .mode = 0222 }, \ .show = NULL, \ .store = NAME##Store, \ }; #define ATTR_SHOW( NAME ) NAME##Show #define ATTR_STORE( NAME ) NAME##Store #define ATTR_GROUP( NAME ) NAME##Group