From a01fc2a295af6418d665d8f9c18af6017a929065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zegan?= Date: Sat, 18 Feb 2017 18:06:47 +0100 Subject: mmc: meson-gx: remove mmc host on device removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/mmc/host/meson-gx-mmc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mmc/host/meson-gx-mmc.c') 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); -- cgit v1.2.3