mmc: sdhi: fix module unloading
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 27 May 2011 14:54:05 +0000 (16:54 +0200)
committerChris Ball <cjb@laptop.org>
Sun, 19 Jun 2011 02:18:06 +0000 (22:18 -0400)
MMC host drivers must be able to process interrupts during
mmc_remove_host().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sh_mobile_sdhi.c

index b3654293017bca33d4de5b77d0f654e07fb92031..2353bb797d6c64789663fe13aa9f4cb57ff195b6 100644 (file)
@@ -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);