eeepc-laptop: add missing name attribute
PATCH 1/1 eeepc-laptop: add missing name attribute
Creates a name file in the sysfs directory, that
is needed for the libsensors library to work.
This fixes bug #11520:
http://bugzilla.kernel.org/show_bug.cgi?id520
Signed-off-by Corentin Chary <[email protected]>
Signed-off-by Jean Delvare <[email protected]>
---
I am adding this patch to my personal hwmon tree and will be sending it to Linus soon. Testers welcome.
drivers/misc/eeepc-laptop.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/misc/eeepc-laptop.c +8 -0
@@ -525,10 +525,18 @@ EEEPC_CREATE_SENSOR_ATTR(fan1_pwm, S_IRUEEEPC_CREATE_SENSOR_ATTR (pwm1_enable,S_IRUGO |S_IWUSR , eeepc_get_fan_ctrl, eeepc_set_fan_ctrl); +static ssize_t +show_name (struct device *dev,struct device_attribute *attr,char *buf) +{ +return sprintf (buf,"eeepc\n" ); +} +static SENSOR_DEVICE_ATTR(name, S_IRUGO, show_name, NULL, 0); +static struct attribute *hwmon_attributes[] = { &sensor_dev_attr_fan1_pwm.dev_attr.attr, &sensor_dev_attr_fan1_input.dev_attr.attr, &sensor_dev_attr_pwm1_enable.dev_attr.attr, + &sensor_dev_attr_name.dev_attr.attr,NULL };
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors