diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-06-22 22:51:46 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-06-22 22:51:46 -0400 |
| commit | dbe1ab9514c231c9b062140a107d9dea0eabefcc (patch) | |
| tree | 0001c7143cf923fc704215f0a0e54221e9e5cbb9 /include/linux/sysdev.h | |
| parent | 612eff0e3715a6faff5ba1b74873b99e036c59fe (diff) | |
| parent | d588fcbe5a7ba8bba2cebf7799ab2d573717a806 (diff) | |
| download | cachepc-linux-dbe1ab9514c231c9b062140a107d9dea0eabefcc.tar.gz cachepc-linux-dbe1ab9514c231c9b062140a107d9dea0eabefcc.zip | |
Merge branch 'master' into upstream
Diffstat (limited to 'include/linux/sysdev.h')
| -rw-r--r-- | include/linux/sysdev.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 2a4b432e1176..166a2e58c287 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -37,11 +37,27 @@ struct sysdev_class { struct kset kset; }; +struct sysdev_class_attribute { + struct attribute attr; + ssize_t (*show)(struct sysdev_class *, char *); + ssize_t (*store)(struct sysdev_class *, const char *, size_t); +}; + +#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ +struct sysdev_class_attribute attr_##_name = { \ + .attr = {.name = __stringify(_name), .mode = _mode }, \ + .show = _show, \ + .store = _store, \ +}; + extern int sysdev_class_register(struct sysdev_class *); extern void sysdev_class_unregister(struct sysdev_class *); - +extern int sysdev_class_create_file(struct sysdev_class *, + struct sysdev_class_attribute *); +extern void sysdev_class_remove_file(struct sysdev_class *, + struct sysdev_class_attribute *); /** * Auxillary system device drivers. */ |
