Skip to content

Commit

Permalink
i2c: Remove i2c clients in reverse order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare committed Nov 28, 2008
1 parent d1846b0 commit 79b93e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79b93e1

Please sign in to comment.