diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 05292e488346..43dcda937ddf 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -498,6 +498,10 @@ ssize_t device_show_int(struct device *dev, struct device_attribute *attr, | |||
| 498 | char *buf); | 498 | char *buf); |
| 499 | ssize_t device_store_int(struct device *dev, struct device_attribute *attr, | 499 | ssize_t device_store_int(struct device *dev, struct device_attribute *attr, |
| 500 | const char *buf, size_t count); | 500 | const char *buf, size_t count); |
| 501 | ssize_t device_show_bool(struct device *dev, struct device_attribute *attr, | ||
| 502 | char *buf); | ||
| 503 | ssize_t device_store_bool(struct device *dev, struct device_attribute *attr, | ||
| 504 | const char *buf, size_t count); | ||
| 501 | 505 | ||
| 502 | #define DEVICE_ATTR(_name, _mode, _show, _store) \ | 506 | #define DEVICE_ATTR(_name, _mode, _show, _store) \ |
| 503 | struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) | 507 | struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) |
| @@ -507,6 +511,9 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr, | |||
| 507 | #define DEVICE_INT_ATTR(_name, _mode, _var) \ | 511 | #define DEVICE_INT_ATTR(_name, _mode, _var) \ |
| 508 | struct dev_ext_attribute dev_attr_##_name = \ | 512 | struct dev_ext_attribute dev_attr_##_name = \ |
| 509 | { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) } | 513 | { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) } |
| 514 | #define DEVICE_BOOL_ATTR(_name, _mode, _var) \ | ||
| 515 | struct dev_ext_attribute dev_attr_##_name = \ | ||
| 516 | { __ATTR(_name, _mode, device_show_bool, device_store_bool), &(_var) } | ||
| 510 | #define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \ | 517 | #define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \ |
| 511 | struct device_attribute dev_attr_##_name = \ | 518 | struct device_attribute dev_attr_##_name = \ |
| 512 | __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) | 519 | __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) |
