diff options
| author | Steve French <sfrench@us.ibm.com> | 2008-04-24 15:26:50 +0000 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2008-04-24 15:26:50 +0000 |
| commit | 36d99df2fb474222ab47fbe8ae7385661033223b (patch) | |
| tree | 962e068491b752a944f61c454fad3f8619a1ea3f /include/linux/sysdev.h | |
| parent | 076d8423a98659a92837b07aa494cb74bfefe77c (diff) | |
| parent | 3dc5063786b273f1aee545844f6bd4e9651ebffe (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/sysdev.h')
| -rw-r--r-- | include/linux/sysdev.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index f752e73bf977..f2767bc6b735 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -45,12 +45,16 @@ struct sysdev_class_attribute { ssize_t (*store)(struct sysdev_class *, const char *, size_t); }; -#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ -struct sysdev_class_attribute attr_##_name = { \ +#define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ +{ \ .attr = {.name = __stringify(_name), .mode = _mode }, \ .show = _show, \ .store = _store, \ -}; +} + +#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ + struct sysdev_class_attribute attr_##_name = \ + _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) extern int sysdev_class_register(struct sysdev_class *); @@ -100,15 +104,16 @@ struct sysdev_attribute { }; -#define _SYSDEV_ATTR(_name,_mode,_show,_store) \ +#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); +#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 *); |
