hwmon: (adm1031) Various cleanups
[powerpc.git] / drivers / hwmon / vt8231.c
index c604972..f876617 100644 (file)
@@ -148,7 +148,7 @@ struct vt8231_data {
        const char *name;
 
        struct mutex update_lock;
-       struct class_device *class_dev;
+       struct device *hwmon_dev;
        char valid;             /* !=0 if following fields are valid */
        unsigned long last_updated;     /* In jiffies */
 
@@ -167,7 +167,7 @@ struct vt8231_data {
 
 static struct pci_dev *s_bridge;
 static int vt8231_probe(struct platform_device *pdev);
-static int vt8231_remove(struct platform_device *pdev);
+static int __devexit vt8231_remove(struct platform_device *pdev);
 static struct vt8231_data *vt8231_update_device(struct device *dev);
 static void vt8231_init_device(struct vt8231_data *data);
 
@@ -504,7 +504,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr,
        case 4: data->fan_div[nr] = 2; break;
        case 8: data->fan_div[nr] = 3; break;
        default:
-               dev_err(dev, "fan_div value %ld not supported."
+               dev_err(dev, "fan_div value %ld not supported. "
                        "Choose one of 1, 2, 4 or 8!\n", val);
                mutex_unlock(&data->update_lock);
                return -EINVAL;
@@ -676,7 +676,7 @@ static struct pci_driver vt8231_pci_driver = {
        .probe          = vt8231_pci_probe,
 };
 
-int vt8231_probe(struct platform_device *pdev)
+static int vt8231_probe(struct platform_device *pdev)
 {
        struct resource *res;
        struct vt8231_data *data;
@@ -726,9 +726,9 @@ int vt8231_probe(struct platform_device *pdev)
                }
        }
 
-       data->class_dev = hwmon_device_register(&pdev->dev);
-       if (IS_ERR(data->class_dev)) {
-               err = PTR_ERR(data->class_dev);
+       data->hwmon_dev = hwmon_device_register(&pdev->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
                goto exit_remove_files;
        }
        return 0;
@@ -751,12 +751,12 @@ exit_release:
        return err;
 }
 
-static int vt8231_remove(struct platform_device *pdev)
+static int __devexit vt8231_remove(struct platform_device *pdev)
 {
        struct vt8231_data *data = platform_get_drvdata(pdev);
        int i;
 
-       hwmon_device_unregister(data->class_dev);
+       hwmon_device_unregister(data->hwmon_dev);
 
        for (i = 0; i < ARRAY_SIZE(vt8231_group_volts); i++)
                sysfs_remove_group(&pdev->dev.kobj, &vt8231_group_volts[i]);