hwmon/smsc47m1: Restore missing name attribute
PATCH 1/1 hwmon/smsc47m1: Restore missing name attribute
The smsc47m1 driver no longer creates the name attribute used by libsensors to identify chip types. It was lost during the conversion to a platform driver. I was fooled by the fact that we do have a group with all attributes, but only to delete them all at once. The group is not used to create the attributes, so we have to explicitly create the name attribute.
This fixes lm-sensors ticket #2236:
http://lm-sensors.org/ticket/2236
---
Mark, this fixes a regression in 2.6.22. This means that this patch must be sent to Linus for 2.6.23, but also to the stable team for 2.6.22.3.
drivers/hwmon/smsc47m1.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hwmon/smsc47m1.c +2 -0
@@ -585,6 +585,8 @@ static int __devinit smsc47m1_probe(struif ((err =device_create_file (dev, &dev_attr_alarms))) goto error_remove_files; +if ((err =device_create_file (dev, &dev_attr_name))) + goto error_remove_files; data->class_dev =hwmon_device_register (dev);if (IS_ERR (data->class_dev)) {
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] hwmon/smsc47m1: Restore missing name
Quoted 23 lines · Jean Delvare
The smsc47m1 driver no longer creates the name attribute used by libsensors to identify chip types. It was lost during the conversion to a platform driver. I was fooled by the fact that we do have a group with all attributes, but only to delete them all at once. The group is not used to create the attributes, so we have to explicitly create the name attribute.
This fixes lm-sensors ticket #2236:
http://lm-sensors.org/ticket/2236Signed-off-by Jean Delvare <[email protected]>---
Mark, this fixes a regression in 2.6.22. This means that this patch must be sent to Linus for 2.6.23, but also to the stable team for 2.6.22.3.drivers/hwmon/smsc47m1.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hwmon/smsc47m1.c static int __devinit smsc47m1_probe(stru · line 592
Quoted 8 lines
drivers/hwmon/smsc47m1.c +2
-0@@ -585,6 +585,8 @@ static int __devinit smsc47m1_probe(struif ((err =device_create_file (dev, &dev_attr_alarms))) goto error_remove_files; +if ((err =device_create_file (dev, &dev_attr_name))) + goto error_remove_files; data->class_dev =hwmon_device_register (dev);if (IS_ERR (data->class_dev)) {
Applied to hwmon-2.6.git/testing, thanks.
Signature · 8 lines
Mark M. Hoffman [email protected] _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors