]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/pc87360.c
time: fold __get_realtime_clock_ts() into getnstimeofday()
[linux-2.6-omap-h63xx.git] / drivers / hwmon / pc87360.c
index cb72526c346a3e04af035503400ff4ae5fdfcbd4..9d660133d517302535c1d42ef6e0ee79097b9acc 100644 (file)
@@ -180,7 +180,7 @@ static inline u8 PWM_TO_REG(int val, int inv)
 
 struct pc87360_data {
        const char *name;
-       struct class_device *class_dev;
+       struct device *hwmon_dev;
        struct mutex lock;
        struct mutex update_lock;
        char valid;             /* !=0 if following fields are valid */
@@ -220,7 +220,7 @@ struct pc87360_data {
  */
 
 static int pc87360_probe(struct platform_device *pdev);
-static int pc87360_remove(struct platform_device *pdev);
+static int __devexit pc87360_remove(struct platform_device *pdev);
 
 static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank,
                              u8 reg);
@@ -500,7 +500,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
 
 static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
 {
-       struct pc87360_data *data = pc87360_update_device(dev);
+       struct pc87360_data *data = dev_get_drvdata(dev);
        return sprintf(buf, "%u\n", data->vrm);
 }
 static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
@@ -1054,9 +1054,9 @@ static int __devinit pc87360_probe(struct platform_device *pdev)
        if ((err = device_create_file(dev, &dev_attr_name)))
                goto ERROR3;
 
-       data->class_dev = hwmon_device_register(dev);
-       if (IS_ERR(data->class_dev)) {
-               err = PTR_ERR(data->class_dev);
+       data->hwmon_dev = hwmon_device_register(dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
                goto ERROR3;
        }
        return 0;
@@ -1083,7 +1083,7 @@ static int __devexit pc87360_remove(struct platform_device *pdev)
        struct pc87360_data *data = platform_get_drvdata(pdev);
        int i;
 
-       hwmon_device_unregister(data->class_dev);
+       hwmon_device_unregister(data->hwmon_dev);
 
        device_remove_file(&pdev->dev, &dev_attr_name);
        sysfs_remove_group(&pdev->dev.kobj, &pc8736x_temp_group);