X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=include%2Flinux%2Fhwmon-sysfs.h;h=7eb4004b36011b2188835751053195d0e1f7b047;hp=1b5018a965f58bdb98b909b70583836fe9008e94;hb=c47a3167d0454c0af5fb0a0322b01a0e3487798e;hpb=31151ba2cef171344beac254e65bd7e00138bb0d diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h index 1b5018a965f5..7eb4004b3601 100644 --- a/include/linux/hwmon-sysfs.h +++ b/include/linux/hwmon-sysfs.h @@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_dev_attr_##_name = { \ .index = _index, \ } +struct sensor_device_attribute_2 { + struct device_attribute dev_attr; + u8 index; + u8 nr; +}; +#define to_sensor_dev_attr_2(_dev_attr) \ + container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr) + +#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, \ +} + #endif /* _LINUX_HWMON_SYSFS_H */