aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc-pltfm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/dw_mmc-pltfm.c')
-rw-r--r--drivers/mmc/host/dw_mmc-pltfm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index e17da912efff..c960ca7ffbe6 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -23,7 +23,8 @@
23 23
24#include "dw_mmc.h" 24#include "dw_mmc.h"
25 25
26int dw_mci_pltfm_register(struct platform_device *pdev) 26int dw_mci_pltfm_register(struct platform_device *pdev,
27 struct dw_mci_drv_data *drv_data)
27{ 28{
28 struct dw_mci *host; 29 struct dw_mci *host;
29 struct resource *regs; 30 struct resource *regs;
@@ -41,6 +42,7 @@ int dw_mci_pltfm_register(struct platform_device *pdev)
41 if (host->irq < 0) 42 if (host->irq < 0)
42 return host->irq; 43 return host->irq;
43 44
45 host->drv_data = drv_data;
44 host->dev = &pdev->dev; 46 host->dev = &pdev->dev;
45 host->irq_flags = 0; 47 host->irq_flags = 0;
46 host->pdata = pdev->dev.platform_data; 48 host->pdata = pdev->dev.platform_data;
@@ -48,6 +50,12 @@ int dw_mci_pltfm_register(struct platform_device *pdev)
48 if (!host->regs) 50 if (!host->regs)
49 return -ENOMEM; 51 return -ENOMEM;
50 52
53 if (host->drv_data->init) {
54 ret = host->drv_data->init(host);
55 if (ret)
56 return ret;
57 }
58
51 platform_set_drvdata(pdev, host); 59 platform_set_drvdata(pdev, host);
52 ret = dw_mci_probe(host); 60 ret = dw_mci_probe(host);
53 return ret; 61 return ret;
@@ -56,7 +64,7 @@ EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
56 64
57static int __devinit dw_mci_pltfm_probe(struct platform_device *pdev) 65static int __devinit dw_mci_pltfm_probe(struct platform_device *pdev)
58{ 66{
59 return dw_mci_pltfm_register(pdev); 67 return dw_mci_pltfm_register(pdev, NULL);
60} 68}
61 69
62static int __devexit dw_mci_pltfm_remove(struct platform_device *pdev) 70static int __devexit dw_mci_pltfm_remove(struct platform_device *pdev)