Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[sfrench/cifs-2.6.git] / include / linux / sysdev.h
index 166a2e58c2871da6dc0de55a3498ae075f869b65..e285746588d68baf4dccc894e70768005342e04a 100644 (file)
@@ -22,6 +22,7 @@
 #define _SYSDEV_H_
 
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <linux/pm.h>
 
 
@@ -98,12 +99,15 @@ 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 },  \
        .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 *);