Skip to contentSkip to conversation

i2c: Drop legacy locking in i2c_new_probed_device

PATCH New Jean Delvare 1 participant 1 message Jan 18, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: Drop legacy locking in i2c_new_probed_device

It is no longer required to hold adapter->clist_lock to call i2c_check_addr.

Cc David Brownell <david-b-yBeKhBN/[email protected]>

---
This goes on top of David Brownell's patch that reworked i2c_check_addr.

 drivers/i2c/i2c-core.c |    2 --
 1 file changed, 2 deletions(-)
drivers/i2c/i2c-core.c +0 -2
@@ -1086,7 +1086,6 @@ i2c_new_probed_device(struct i2c_adapter
 		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
 				break;
 		}
 	}
-	mutex_unlock(&adap->clist_lock);
 
 	if (addr_list[i] == I2C_CLIENT_END) {
 		dev_dbg(&adap->dev, "Probing failed, no device found\n");
Signature · 6 lines
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c