ARM: 6165/1: trap overflows on highmem pages from kmap_atomic when debugging
[safe/jmp/linux-2.6] / drivers / hwmon / tmp401.c
index ed08649..d14a1af 100644 (file)
@@ -42,8 +42,7 @@
 /* Addresses to scan */
 static const unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END };
 
-/* Insmod parameters */
-I2C_CLIENT_INSMOD_2(tmp401, tmp411);
+enum chips { tmp401, tmp411 };
 
 /*
  * The TMP401 registers, note some registers have different addresses for
@@ -135,7 +134,7 @@ struct tmp401_data {
        struct mutex update_lock;
        char valid; /* zero until following fields are valid */
        unsigned long last_updated; /* in jiffies */
-       int kind;
+       enum chips kind;
 
        /* register values */
        u8 status;
@@ -525,7 +524,7 @@ static int tmp401_detect(struct i2c_client *client,
        if (reg > 15)
                return -ENODEV;
 
-       strlcpy(info->type, tmp401_id[kind - 1].name, I2C_NAME_SIZE);
+       strlcpy(info->type, tmp401_id[kind].name, I2C_NAME_SIZE);
 
        return 0;
 }
@@ -573,8 +572,7 @@ static int tmp401_probe(struct i2c_client *client,
                goto exit_remove;
        }
 
-       dev_info(&client->dev, "Detected TI %s chip\n",
-                names[data->kind - 1]);
+       dev_info(&client->dev, "Detected TI %s chip\n", names[data->kind]);
 
        return 0;