mmc: fix sdhci-dove probe/removal
authorRussell King - ARM Linux <linux@arm.linux.org.uk>
Mon, 29 Oct 2012 21:43:07 +0000 (21:43 +0000)
committerChris Ball <cjb@laptop.org>
Wed, 7 Nov 2012 20:02:03 +0000 (15:02 -0500)
commitee3298a2b6832bcfeec040dabf19632b704d826a
tree4cc47cfa7510783061db8264c63fa9462f5c8eb8
parenta0d28ba01ebd048b4ba418142b37f5cf80e6d156
mmc: fix sdhci-dove probe/removal

1. Never ever publish a device in the system before it has been setup
   to a usable state.
2. Unregister the device _BEFORE_ taking away any resources it may be
   using.
3. Don't check clks against NULL.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-dove.c