diff options
Diffstat (limited to 'drivers/hwmon/smsc47m1.c')
-rw-r--r-- | drivers/hwmon/smsc47m1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index d3181967f167..a10a380868e2 100644 --- a/drivers/hwmon/smsc47m1.c +++ b/drivers/hwmon/smsc47m1.c | |||
@@ -116,7 +116,7 @@ struct smsc47m1_data { | |||
116 | unsigned short addr; | 116 | unsigned short addr; |
117 | const char *name; | 117 | const char *name; |
118 | enum chips type; | 118 | enum chips type; |
119 | struct class_device *class_dev; | 119 | struct device *hwmon_dev; |
120 | 120 | ||
121 | struct mutex update_lock; | 121 | struct mutex update_lock; |
122 | unsigned long last_updated; /* In jiffies */ | 122 | unsigned long last_updated; /* In jiffies */ |
@@ -553,7 +553,7 @@ static int __devinit smsc47m1_probe(struct platform_device *pdev) | |||
553 | || (err = device_create_file(dev, | 553 | || (err = device_create_file(dev, |
554 | &sensor_dev_attr_fan3_div.dev_attr))) | 554 | &sensor_dev_attr_fan3_div.dev_attr))) |
555 | goto error_remove_files; | 555 | goto error_remove_files; |
556 | } else | 556 | } else if (data->type == smsc47m2) |
557 | dev_dbg(dev, "Fan 3 not enabled by hardware, skipping\n"); | 557 | dev_dbg(dev, "Fan 3 not enabled by hardware, skipping\n"); |
558 | 558 | ||
559 | if (pwm1) { | 559 | if (pwm1) { |
@@ -580,7 +580,7 @@ static int __devinit smsc47m1_probe(struct platform_device *pdev) | |||
580 | || (err = device_create_file(dev, | 580 | || (err = device_create_file(dev, |
581 | &sensor_dev_attr_pwm3_enable.dev_attr))) | 581 | &sensor_dev_attr_pwm3_enable.dev_attr))) |
582 | goto error_remove_files; | 582 | goto error_remove_files; |
583 | } else | 583 | } else if (data->type == smsc47m2) |
584 | dev_dbg(dev, "PWM 3 not enabled by hardware, skipping\n"); | 584 | dev_dbg(dev, "PWM 3 not enabled by hardware, skipping\n"); |
585 | 585 | ||
586 | if ((err = device_create_file(dev, &dev_attr_alarms))) | 586 | if ((err = device_create_file(dev, &dev_attr_alarms))) |
@@ -588,9 +588,9 @@ static int __devinit smsc47m1_probe(struct platform_device *pdev) | |||
588 | if ((err = device_create_file(dev, &dev_attr_name))) | 588 | if ((err = device_create_file(dev, &dev_attr_name))) |
589 | goto error_remove_files; | 589 | goto error_remove_files; |
590 | 590 | ||
591 | data->class_dev = hwmon_device_register(dev); | 591 | data->hwmon_dev = hwmon_device_register(dev); |
592 | if (IS_ERR(data->class_dev)) { | 592 | if (IS_ERR(data->hwmon_dev)) { |
593 | err = PTR_ERR(data->class_dev); | 593 | err = PTR_ERR(data->hwmon_dev); |
594 | goto error_remove_files; | 594 | goto error_remove_files; |
595 | } | 595 | } |
596 | 596 | ||
@@ -611,7 +611,7 @@ static int __devexit smsc47m1_remove(struct platform_device *pdev) | |||
611 | struct smsc47m1_data *data = platform_get_drvdata(pdev); | 611 | struct smsc47m1_data *data = platform_get_drvdata(pdev); |
612 | struct resource *res; | 612 | struct resource *res; |
613 | 613 | ||
614 | hwmon_device_unregister(data->class_dev); | 614 | hwmon_device_unregister(data->hwmon_dev); |
615 | sysfs_remove_group(&pdev->dev.kobj, &smsc47m1_group); | 615 | sysfs_remove_group(&pdev->dev.kobj, &smsc47m1_group); |
616 | 616 | ||
617 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); | 617 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); |