i2c: Drop legacy locking in i2c_new_probed_device
authorJean Delvare <khali@linux-fr.org>
Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)
committerJean Delvare <khali@hyperion.delvare>
Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)
It is no longer required to hold adapter->clist_lock to call
i2c_check_addr.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
drivers/i2c/i2c-core.c

index 4765a50d753778ef60463307e16315669e969b85..cd3fcb85ca7f5cc4efb7812c07c2312e7f56e60e 100644 (file)
@@ -1086,7 +1086,6 @@ i2c_new_probed_device(struct i2c_adapter *adap,
                return NULL;
        }
 
-       mutex_lock(&adap->clist_lock);
        for (i = 0; addr_list[i] != I2C_CLIENT_END; i++) {
                /* Check address validity */
                if (addr_list[i] < 0x03 || addr_list[i] > 0x77) {
@@ -1124,7 +1123,6 @@ i2c_new_probed_device(struct i2c_adapter *adap,
                                break;
                }
        }
-       mutex_unlock(&adap->clist_lock);
 
        if (addr_list[i] == I2C_CLIENT_END) {
                dev_dbg(&adap->dev, "Probing failed, no device found\n");