]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/dme1737.c
[S390] vmlogrdr: module initialization function should return negative errors
[linux-2.6] / drivers / hwmon / dme1737.c
index 307f48de051fda03f0b4fe9f7303817e9b520be3..7673f65877e11bd3516264a692214356e77dc965 100644 (file)
@@ -49,7 +49,7 @@ module_param(force_id, ushort, 0);
 MODULE_PARM_DESC(force_id, "Override the detected device ID");
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = {0x2c, 0x2d, 0x2e, I2C_CLIENT_END};
+static const unsigned short normal_i2c[] = {0x2c, 0x2d, 0x2e, I2C_CLIENT_END};
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(dme1737);
@@ -2030,7 +2030,7 @@ static int dme1737_i2c_get_features(int sio_cip, struct dme1737_data *data)
 
        /* Check device ID
         * The DME1737 can return either 0x78 or 0x77 as its device ID. */
-       reg = dme1737_sio_inb(sio_cip, 0x20);
+       reg = force_id ? force_id : dme1737_sio_inb(sio_cip, 0x20);
        if (!(reg == 0x77 || reg == 0x78)) {
                err = -ENODEV;
                goto exit;