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>
This commit is contained in:
Jean Delvare 2008-11-28 15:24:38 +01:00
Родитель d1846b0e7a
Коммит 79b93e1359
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -631,7 +631,7 @@ int i2c_del_adapter(struct i2c_adapter *adap)
/* detach any active clients. This must be done first, because /* detach any active clients. This must be done first, because
* it can fail; in which case we give up. */ * 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; struct i2c_driver *driver;
driver = client->driver; driver = client->driver;