diff options
-rw-r--r-- | drivers/i2c/i2c-core.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index c23443ee1b33..52b77477df57 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -246,10 +246,6 @@ int i2c_del_adapter(struct i2c_adapter *adap) | |||
246 | list_for_each_safe(item, _n, &adap->clients) { | 246 | list_for_each_safe(item, _n, &adap->clients) { |
247 | client = list_entry(item, struct i2c_client, list); | 247 | client = list_entry(item, struct i2c_client, list); |
248 | 248 | ||
249 | /* detaching devices is unconditional of the set notify | ||
250 | * flag, as _all_ clients that reside on the adapter | ||
251 | * must be deleted, as this would cause invalid states. | ||
252 | */ | ||
253 | if ((res=client->driver->detach_client(client))) { | 249 | if ((res=client->driver->detach_client(client))) { |
254 | dev_err(&adap->dev, "detach_client failed for client " | 250 | dev_err(&adap->dev, "detach_client failed for client " |
255 | "[%s] at address 0x%02x\n", client->name, | 251 | "[%s] at address 0x%02x\n", client->name, |
@@ -335,10 +331,6 @@ int i2c_del_driver(struct i2c_driver *driver) | |||
335 | /* Have a look at each adapter, if clients of this driver are still | 331 | /* Have a look at each adapter, if clients of this driver are still |
336 | * attached. If so, detach them to be able to kill the driver | 332 | * attached. If so, detach them to be able to kill the driver |
337 | * afterwards. | 333 | * afterwards. |
338 | * | ||
339 | * Removing clients does not depend on the notify flag, else | ||
340 | * invalid operation might (will!) result, when using stale client | ||
341 | * pointers. | ||
342 | */ | 334 | */ |
343 | list_for_each(item1,&adapters) { | 335 | list_for_each(item1,&adapters) { |
344 | adap = list_entry(item1, struct i2c_adapter, list); | 336 | adap = list_entry(item1, struct i2c_adapter, list); |