X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsysdev.h;h=389ccf858d378013f7cc86f94e51db5df46f9991;hb=7583b6e424ebaa278342f6a8c2a61211af56dad1;hp=166a2e58c2871da6dc0de55a3498ae075f869b65;hpb=1bd2e5ae18a8f93333707d81d3dbd9209a255137;p=linux-2.6 diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 166a2e58c2..389ccf858d 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -98,12 +98,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 *);