vserver 1.9.3
[linux-2.6.git] / drivers / i2c / chips / w83781d.c
index 785203d..063d34a 100644 (file)
@@ -60,7 +60,7 @@ I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
                    "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 static int init = 1;
-MODULE_PARM(init, "i");
+module_param(init, bool, 0);
 MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization");
 
 /* Constants specified below */
@@ -503,9 +503,9 @@ show_vid_reg(struct device *dev, char *buf)
 }
 
 static
-DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL);
+DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 #define device_create_file_vid(client) \
-device_create_file(&client->dev, &dev_attr_in0_ref);
+device_create_file(&client->dev, &dev_attr_cpu0_vid);
 static ssize_t
 show_vrm_reg(struct device *dev, char *buf)
 {
@@ -815,8 +815,7 @@ store_sensor_reg(struct device *dev, const char *buf, size_t count, int nr)
                data->sens[nr - 1] = val;
                break;
        default:
-               dev_err(&client->dev,
-                      "Invalid sensor type %ld; must be 1, 2, or %d\n",
+               dev_err(dev, "Invalid sensor type %ld; must be 1, 2, or %d\n",
                       (long) val, W83781D_DEFAULT_BETA);
                break;
        }
@@ -1513,7 +1512,7 @@ w83781d_init_client(struct i2c_client *client)
                w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0);
        }
 
-       data->vrm = 82;
+       data->vrm = i2c_which_vrm();
 
        if ((type != w83781d) && (type != as99127f)) {
                tmp = w83781d_read_value(client, W83781D_REG_SCFG1);
@@ -1593,7 +1592,7 @@ static struct w83781d_data *w83781d_update_device(struct device *dev)
        if (time_after
            (jiffies - data->last_updated, (unsigned long) (HZ + HZ / 2))
            || time_before(jiffies, data->last_updated) || !data->valid) {
-               pr_debug("Starting device update\n");
+               dev_dbg(dev, "Starting device update\n");
 
                for (i = 0; i <= 8; i++) {
                        if ((data->type == w83783s || data->type == w83697hf)