aboutsummaryrefslogtreecommitdiff
path: root/include/linux/hwmon-sysfs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 15:51:32 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 15:51:32 -0800
commitb6585dedac232ca79fe978d97a95fdaa6da24f66 (patch)
tree4d2d78300bb9bcfb40cb35450f78dd3af82c78d3 /include/linux/hwmon-sysfs.h
parenta3ea9b584ed2acdeae817f0dc91a5880e0828a05 (diff)
parentded2b66615613093eeb83b81499bc270de8fc499 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6: (36 commits) [PATCH] hwmon: add required idr locking [PATCH] I2C: hwmon: Rename register parameters [PATCH] I2C: Drop unneeded i2c-dev.h includes [PATCH] I2C: i2c-ixp4xx: Add hwmon class [PATCH] I2C: i2c-piix4: Add Broadcom HT-1000 support [PATCH] I2C: i2c-amd756-s4882: Improve static mutex initialization [PATCH] I2C: i2c-ali1535: Drop redundant mutex [PATCH] i2c: Cleanup isp1301_omap [PATCH] i2c: Fix i2c-ite name initialization [PATCH] i2c: Drop the i2c-frodo bus driver [PATCH] i2c: Optimize core_lists mutex usage [PATCH] w83781d: Don't reset the chip by default [PATCH] w83781d: Document the alarm and beep bits [PATCH] w83627ehf: Refactor the sysfs interface [PATCH] hwmon: Support the Pentium M VID code [PATCH] hwmon: Add support for the Winbond W83687THF [PATCH] hwmon: f71805f semaphore to mutex conversions [PATCH] hwmon: Semaphore to mutex conversions [PATCH] i2c: Semaphore to mutex conversions, part 3 [PATCH] i2c: Semaphore to mutex conversions, part 2 ...
Diffstat (limited to 'include/linux/hwmon-sysfs.h')
-rw-r--r--include/linux/hwmon-sysfs.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h
index 7eb4004b360..a90c09d331c 100644
--- a/include/linux/hwmon-sysfs.h
+++ b/include/linux/hwmon-sysfs.h
@@ -27,11 +27,13 @@ struct sensor_device_attribute{
#define to_sensor_dev_attr(_dev_attr) \
container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
-#define SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index) \
-struct sensor_device_attribute sensor_dev_attr_##_name = { \
- .dev_attr = __ATTR(_name,_mode,_show,_store), \
- .index = _index, \
-}
+#define SENSOR_ATTR(_name, _mode, _show, _store, _index) \
+ { .dev_attr = __ATTR(_name, _mode, _show, _store), \
+ .index = _index }
+
+#define SENSOR_DEVICE_ATTR(_name, _mode, _show, _store, _index) \
+struct sensor_device_attribute sensor_dev_attr_##_name \
+ = SENSOR_ATTR(_name, _mode, _show, _store, _index)
struct sensor_device_attribute_2 {
struct device_attribute dev_attr;
@@ -41,11 +43,13 @@ struct sensor_device_attribute_2 {
#define to_sensor_dev_attr_2(_dev_attr) \
container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr)
+#define SENSOR_ATTR_2(_name, _mode, _show, _store, _nr, _index) \
+ { .dev_attr = __ATTR(_name, _mode, _show, _store), \
+ .index = _index, \
+ .nr = _nr }
+
#define SENSOR_DEVICE_ATTR_2(_name,_mode,_show,_store,_nr,_index) \
-struct sensor_device_attribute_2 sensor_dev_attr_##_name = { \
- .dev_attr = __ATTR(_name,_mode,_show,_store), \
- .index = _index, \
- .nr = _nr, \
-}
+struct sensor_device_attribute_2 sensor_dev_attr_##_name \
+ = SENSOR_ATTR_2(_name, _mode, _show, _store, _nr, _index)
#endif /* _LINUX_HWMON_SYSFS_H */