]> err.no Git - linux-2.6/blobdiff - drivers/i2c/i2c-core.c
[PATCH] pipe: remove redundant fifo_poll abstraction
[linux-2.6] / drivers / i2c / i2c-core.c
index bee0148dfab8c60a54651a7d96b9004bcfc87420..dda472e5e8be3bca0be40f383b2643048c3d0c51 100644 (file)
@@ -679,9 +679,16 @@ static int i2c_probe_address(struct i2c_adapter *adapter, int addr, int kind,
                return 0;
 
        /* Make sure there is something at this address, unless forced */
-       if (kind < 0
-        && i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0)
-               return 0;
+       if (kind < 0) {
+               if (i2c_smbus_xfer(adapter, addr, 0, 0, 0,
+                                  I2C_SMBUS_QUICK, NULL) < 0)
+                       return 0;
+
+               /* prevent 24RF08 corruption */
+               if ((addr & ~0x0f) == 0x50)
+                       i2c_smbus_xfer(adapter, addr, 0, 0, 0,
+                                      I2C_SMBUS_QUICK, NULL);
+       }
 
        /* Finally call the custom detection function */
        err = found_proc(adapter, addr, kind);