Commit 8d1290b8 authored by Patrick Mochel's avatar Patrick Mochel

driverfs: Declare DEVICE_ATTR macro for initializing device attributes

(hide internal format of the structure)
parent 9c817b39
......@@ -37,11 +37,18 @@ struct device;
struct device_attribute {
char * name;
mode_t mode;
ssize_t (*show)(struct device * dev, char * buf, size_t count, loff_t off);
ssize_t (*store)(struct device * dev, const char * buf, size_t count, loff_t off);
};
#define DEVICE_ATTR(_name,_str,_mode,_show,_store) \
struct device_attribute dev_attr_##_name = { \
.name = _str, \
.mode = _mode, \
.show = _show, \
.store = _store, \
};
extern int
driverfs_create_dir(struct driver_dir_entry *, struct driver_dir_entry *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment