]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/w1/masters/ds2482.c
[ATM]: Convert struct class_device to struct device
[linux-2.6-omap-h63xx.git] / drivers / w1 / masters / ds2482.c
index af492cc48db2ced37cc1cd3432feb070b35fa408..0fd5820d5c6105a18ea99f0a4daf9c74f2c0dfcc 100644 (file)
@@ -29,7 +29,7 @@
  * However, the chip cannot be detected without doing an i2c write,
  * so use the force module parameter.
  */
-static unsigned short normal_i2c[] = {I2C_CLIENT_END};
+static const unsigned short normal_i2c[] = { I2C_CLIENT_END };
 
 /**
  * Insmod parameters
@@ -218,7 +218,7 @@ static int ds2482_wait_1wire_idle(struct ds2482_data *pdev)
                do {
                        temp = i2c_smbus_read_byte(&pdev->client);
                } while ((temp >= 0) && (temp & DS2482_REG_STS_1WB) &&
-                        (++retries > DS2482_WAIT_IDLE_TIMEOUT));
+                        (++retries < DS2482_WAIT_IDLE_TIMEOUT));
        }
 
        if (retries > DS2482_WAIT_IDLE_TIMEOUT)