Commit 79b93e13 authored by Jean Delvare's avatar Jean Delvare
Browse files

i2c: Remove i2c clients in reverse order

i2c clients should be removed in reverse order compared to the probe
(actually: bind) order. This matters when several clients depend on
each other.
Signed-off-by: default avatarJean Delvare <>
Tested-by: default avatarGuennadi Liakhovetski <>
parent d1846b0e
......@@ -631,7 +631,7 @@ int i2c_del_adapter(struct i2c_adapter *adap)
/* detach any active clients. This must be done first, because
* it can fail; in which case we give up. */
list_for_each_entry_safe(client, _n, &adap->clients, list) {
list_for_each_entry_safe_reverse(client, _n, &adap->clients, list) {
struct i2c_driver *driver;
driver = client->driver;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment