[Driver Model] Consolidate attribute definition macros
- Create __ATTR(), __ATTR_RO(), and __ATTR_NULL macros to help define
attributes in a neat, short-hand form.
- Apply these macros to the attribute definition in include/linux/device.h
- Note: These can be used to more cleanly define attributes in your own
code. e.g:
static struct device_attribute attrs[] = {
__ATTR_RO(foo),
__ATTR_RO(bar),
__ATTR(baz,0666,baz_show,baz_store),
__ATTR_NULL,
};
...etc.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment