Ticket #2236: hwmon-smsc47m1-missing-name-attribute.patch

File hwmon-smsc47m1-missing-name-attribute.patch, 0.9 KB (added by khali, 5 years ago)

Restore the smsc47m1 name attribute

  • drivers/hwmon/smsc47m1.c

    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.
    
    Signed-off-by: Jean Delvare <khali@linux-fr.org>
    ---
     drivers/hwmon/smsc47m1.c |    2 ++
     1 file changed, 2 insertions(+)
    
    old new  
    585585 
    586586        if ((err = device_create_file(dev, &dev_attr_alarms))) 
    587587                goto error_remove_files; 
     588        if ((err = device_create_file(dev, &dev_attr_name))) 
     589                goto error_remove_files; 
    588590 
    589591        data->class_dev = hwmon_device_register(dev); 
    590592        if (IS_ERR(data->class_dev)) {