X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Fsysdev.h;h=e699ab279c2c1302d03bdb25e10bd36567fbc507;hb=681e14730c73cc2c71af282c001de6bc71c22f00;hp=166a2e58c2871da6dc0de55a3498ae075f869b65;hpb=6fa0cb1141da80eed4f86155fb51931bc1c31888;p=powerpc.git diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 166a2e58c2..e699ab279c 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -22,6 +22,7 @@ #define _SYSDEV_H_ #include +#include #include @@ -98,12 +99,16 @@ struct sysdev_attribute { }; -#define SYSDEV_ATTR(_name,_mode,_show,_store) \ -struct sysdev_attribute attr_##_name = { \ - .attr = {.name = __stringify(_name), .mode = _mode }, \ +#define _SYSDEV_ATTR(_name,_mode,_show,_store) \ +{ \ + .attr = { .name = __stringify(_name), .mode = _mode, \ + .owner = THIS_MODULE }, \ .show = _show, \ .store = _store, \ -}; +} + +#define SYSDEV_ATTR(_name,_mode,_show,_store) \ +struct sysdev_attribute attr_##_name = _SYSDEV_ATTR(_name,_mode,_show,_store); extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);