diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2010-07-20 16:24:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-20 19:25:41 -0400 |
commit | 9d51a6b2487724e8713cd2794cf09ffeee5f6932 (patch) | |
tree | acd827ad096722944daa54b694342876abbcff79 /drivers | |
parent | d45840d9f04be4d8c0288066f37bca3a448f7471 (diff) |
sdhci-s3c: add missing remove function
System will crash sooner or later once the memory with the code of the
s3c-sdhci.ko module is reused for something else. I really have no idea
how the lack of remove function went unnoticed into the mainline code.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/sdhci-s3c.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index af217924a76e..ad30f074ee15 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c | |||
@@ -365,6 +365,26 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) | |||
365 | 365 | ||
366 | static int __devexit sdhci_s3c_remove(struct platform_device *pdev) | 366 | static int __devexit sdhci_s3c_remove(struct platform_device *pdev) |
367 | { | 367 | { |
368 | struct sdhci_host *host = platform_get_drvdata(pdev); | ||
369 | struct sdhci_s3c *sc = sdhci_priv(host); | ||
370 | int ptr; | ||
371 | |||
372 | sdhci_remove_host(host, 1); | ||
373 | |||
374 | for (ptr = 0; ptr < 3; ptr++) { | ||
375 | clk_disable(sc->clk_bus[ptr]); | ||
376 | clk_put(sc->clk_bus[ptr]); | ||
377 | } | ||
378 | clk_disable(sc->clk_io); | ||
379 | clk_put(sc->clk_io); | ||
380 | |||
381 | iounmap(host->ioaddr); | ||
382 | release_resource(sc->ioarea); | ||
383 | kfree(sc->ioarea); | ||
384 | |||
385 | sdhci_free_host(host); | ||
386 | platform_set_drvdata(pdev, NULL); | ||
387 | |||
368 | return 0; | 388 | return 0; |
369 | } | 389 | } |
370 | 390 | ||