Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105082
b: refs/heads/master
c: 907b2cd
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Pierre Ossman committed Jul 23, 2008
1 parent a2f58c9 commit d82d63a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd8572af68229a65b6716b286395ad7f5e2ecc48
refs/heads/master: 907b2cd6dbbdfd6a4be7908f57b1498dfabc880e
20 changes: 16 additions & 4 deletions trunk/drivers/mmc/host/s3cmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,21 +1331,30 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440)
return ret;
}

static void s3cmci_shutdown(struct platform_device *pdev)
{
struct mmc_host *mmc = platform_get_drvdata(pdev);
struct s3cmci_host *host = mmc_priv(mmc);

if (host->irq_cd >= 0)
free_irq(host->irq_cd, host);

mmc_remove_host(mmc);
clk_disable(host->clk);
}

static int __devexit s3cmci_remove(struct platform_device *pdev)
{
struct mmc_host *mmc = platform_get_drvdata(pdev);
struct s3cmci_host *host = mmc_priv(mmc);

mmc_remove_host(mmc);
s3cmci_shutdown(pdev);

clk_disable(host->clk);
clk_put(host->clk);

tasklet_disable(&host->pio_tasklet);
s3c2410_dma_free(S3CMCI_DMA, &s3cmci_dma_client);

if (host->irq_cd >= 0)
free_irq(host->irq_cd, host);
free_irq(host->irq, host);

iounmap(host->base);
Expand Down Expand Up @@ -1397,6 +1406,7 @@ static struct platform_driver s3cmci_2410_driver = {
.driver.owner = THIS_MODULE,
.probe = s3cmci_2410_probe,
.remove = __devexit_p(s3cmci_remove),
.shutdown = s3cmci_shutdown,
.suspend = s3cmci_suspend,
.resume = s3cmci_resume,
};
Expand All @@ -1406,6 +1416,7 @@ static struct platform_driver s3cmci_2412_driver = {
.driver.owner = THIS_MODULE,
.probe = s3cmci_2412_probe,
.remove = __devexit_p(s3cmci_remove),
.shutdown = s3cmci_shutdown,
.suspend = s3cmci_suspend,
.resume = s3cmci_resume,
};
Expand All @@ -1415,6 +1426,7 @@ static struct platform_driver s3cmci_2440_driver = {
.driver.owner = THIS_MODULE,
.probe = s3cmci_2440_probe,
.remove = __devexit_p(s3cmci_remove),
.shutdown = s3cmci_shutdown,
.suspend = s3cmci_suspend,
.resume = s3cmci_resume,
};
Expand Down

0 comments on commit d82d63a

Please sign in to comment.