Browse Source

mmc: meson-gx: remove mmc host on device removal

The mmc host was added in meson_mmc_probe, but never removed in
meson_mmc_remove.
Fix that by removing the host before deallocating other resources.

Signed-off-by: Michał Zegan <webczat@webczatnet.pl>
Tested-by: Michał Zegan <webczat@webczatnet.pl>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Michał Zegan 8 years ago
parent
commit
a01fc2a295
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/mmc/host/meson-gx-mmc.c

+ 2 - 0
drivers/mmc/host/meson-gx-mmc.c

@@ -793,6 +793,8 @@ static int meson_mmc_remove(struct platform_device *pdev)
 {
 {
 	struct meson_host *host = dev_get_drvdata(&pdev->dev);
 	struct meson_host *host = dev_get_drvdata(&pdev->dev);
 
 
+	mmc_remove_host(host->mmc);
+
 	/* disable interrupts */
 	/* disable interrupts */
 	writel(0, host->regs + SD_EMMC_IRQ_EN);
 	writel(0, host->regs + SD_EMMC_IRQ_EN);