mmc: meson-gx: remove mmc host on device removal
authorMichał Zegan <webczat@webczatnet.pl>
Sat, 18 Feb 2017 17:06:47 +0000 (18:06 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:41:17 +0000 (21:41 +0200)
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>
drivers/mmc/host/meson-gx-mmc.c

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