From: Michał Zegan Date: Sat, 18 Feb 2017 17:06:47 +0000 (+0100) Subject: mmc: meson-gx: remove mmc host on device removal X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a01fc2a295af6418d665d8f9c18af6017a929065;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Tested-by: Michał Zegan Acked-by: Kevin Hilman Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 62597638ccaf..c574e1519623 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/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); + mmc_remove_host(host->mmc); + /* disable interrupts */ writel(0, host->regs + SD_EMMC_IRQ_EN);