diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-11-28 09:24:38 -0500 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2008-11-28 09:24:38 -0500 |
commit | 79b93e1359b1414b438f239c6e5e0ad91232e4c8 (patch) | |
tree | 0153ab798dca0f73c59297d161561c75364649da /drivers/i2c | |
parent | d1846b0e7a1dc26f90fb0d75641aca9abb077ef9 (diff) |
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: Jean Delvare <khali@linux-fr.org>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5a485c22660a..c6a63f46bc15 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -631,7 +631,7 @@ int i2c_del_adapter(struct i2c_adapter *adap) | |||
631 | 631 | ||
632 | /* detach any active clients. This must be done first, because | 632 | /* detach any active clients. This must be done first, because |
633 | * it can fail; in which case we give up. */ | 633 | * it can fail; in which case we give up. */ |
634 | list_for_each_entry_safe(client, _n, &adap->clients, list) { | 634 | list_for_each_entry_safe_reverse(client, _n, &adap->clients, list) { |
635 | struct i2c_driver *driver; | 635 | struct i2c_driver *driver; |
636 | 636 | ||
637 | driver = client->driver; | 637 | driver = client->driver; |