diff -uprN -X dontdiff linux-2.6.12-rc4-sysfsdyncallback-deviceattr-nowarn/include/linux/device.h linux-2.6.12-rc4-sysfsdyncallback-deviceattr-macro/include/linux/device.h --- linux-2.6.12-rc4-sysfsdyncallback-deviceattr-nowarn/include/linux/device.h 2005-05-10 23:38:13.000000000 -0400 +++ linux-2.6.12-rc4-sysfsdyncallback-deviceattr-macro/include/linux/device.h 2005-05-11 03:15:40.000000000 -0400 @@ -343,6 +343,13 @@ struct device_attribute { #define DEVICE_ATTR(_name,_mode,_show,_store) \ struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store) +#define DEVICE_ATTR_PRIVATE(_name,_mode,_show,_store,_private) \ +struct device_attribute dev_attr_##_name = { \ + .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE, \ + .private = _private, }, \ + .show = _show, \ + .store = _store, \ +} extern int device_create_file(struct device *device, struct device_attribute * entry); extern void device_remove_file(struct device * dev, struct device_attribute * attr);