From: Guennadi Liakhovetski Date: Fri, 27 May 2011 14:54:05 +0000 (+0200) Subject: mmc: sdhi: fix module unloading X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=742a0c7cae9bd0f913c71722289b8ec862d70a2b;p=linux-beck.git mmc: sdhi: fix module unloading MMC host drivers must be able to process interrupts during mmc_remove_host(). Signed-off-by: Guennadi Liakhovetski Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index b3654293017b..2353bb797d6c 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -165,13 +165,14 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev) p->pdata = NULL; + tmio_mmc_host_remove(host); + for (i = 0; i < 3; i++) { irq = platform_get_irq(pdev, i); if (irq >= 0) free_irq(irq, host); } - tmio_mmc_host_remove(host); clk_disable(priv->clk); clk_put(priv->clk); kfree(priv);