aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-02-17 02:38:23 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2010-03-07 16:17:27 -0500
commit7ee422dc6e947fcdc153246d47f26ae0b7cf083d (patch)
tree840b9c7b7a11abe91af7ac459bd68888ae39ffe7 /drivers
parent707f0b2fbc65876e8abd94d26d8d0620600c05d4 (diff)
tmio_mmc: Balance cell enable()/disable() calls
This patch adds cell->disable() calls to the tmio-mmc probe() error handling and the remove() function. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/tmio_mmc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 7b2376d4050a..b2b577f6afd4 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -569,14 +569,14 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
569 if (ret >= 0) 569 if (ret >= 0)
570 host->irq = ret; 570 host->irq = ret;
571 else 571 else
572 goto unmap_ctl; 572 goto cell_disable;
573 573
574 disable_mmc_irqs(host, TMIO_MASK_ALL); 574 disable_mmc_irqs(host, TMIO_MASK_ALL);
575 575
576 ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED | 576 ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED |
577 IRQF_TRIGGER_FALLING, dev_name(&dev->dev), host); 577 IRQF_TRIGGER_FALLING, dev_name(&dev->dev), host);
578 if (ret) 578 if (ret)
579 goto unmap_ctl; 579 goto cell_disable;
580 580
581 mmc_add_host(mmc); 581 mmc_add_host(mmc);
582 582
@@ -588,6 +588,9 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
588 588
589 return 0; 589 return 0;
590 590
591cell_disable:
592 if (cell->disable)
593 cell->disable(dev);
591unmap_ctl: 594unmap_ctl:
592 iounmap(host->ctl); 595 iounmap(host->ctl);
593host_free: 596host_free:
@@ -598,6 +601,7 @@ out:
598 601
599static int __devexit tmio_mmc_remove(struct platform_device *dev) 602static int __devexit tmio_mmc_remove(struct platform_device *dev)
600{ 603{
604 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
601 struct mmc_host *mmc = platform_get_drvdata(dev); 605 struct mmc_host *mmc = platform_get_drvdata(dev);
602 606
603 platform_set_drvdata(dev, NULL); 607 platform_set_drvdata(dev, NULL);
@@ -606,6 +610,8 @@ static int __devexit tmio_mmc_remove(struct platform_device *dev)
606 struct tmio_mmc_host *host = mmc_priv(mmc); 610 struct tmio_mmc_host *host = mmc_priv(mmc);
607 mmc_remove_host(mmc); 611 mmc_remove_host(mmc);
608 free_irq(host->irq, host); 612 free_irq(host->irq, host);
613 if (cell->disable)
614 cell->disable(dev);
609 iounmap(host->ctl); 615 iounmap(host->ctl);
610 mmc_free_host(mmc); 616 mmc_free_host(mmc);
611 } 617 }