i2c: Unregister dummy devices last on adapter removal
authorJean Delvare <khali@linux-fr.org>
Fri, 14 Jan 2011 21:03:49 +0000 (22:03 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:28 +0000 (15:14 -0800)
commit84d6dfc30b3f533b257f4976b284a560d8dc5bc2
tree97bfd74c5f63080fbecac8cdcaceb0a54964c170
parent99939b7d2b1b63c2f62aab32306f476d416f1491
i2c: Unregister dummy devices last on adapter removal

commit 5219bf884b6e2b54e734ca1799b6f0014bb2b4b7 upstream.

Remove real devices first and dummy devices last. This gives device
driver which instantiated dummy devices themselves a chance to clean
them up before we do.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/i2c-core.c