summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYuvaraj Kumar C D <yuvaraj.cd@gmail.com>2013-08-31 00:12:19 +0900
committerHyungwon Hwang <human.hwang@samsung.com>2014-12-15 18:15:49 +0900
commit894a31ef32562fb2cb0d2a6fab754ceac4c850f1 (patch)
tree42181ce7451f01f1fd60b7b37047ec48f6a18c58 /drivers
parent435f434f04109e339bb8dd86a89189918e617aa4 (diff)
downloadlinux-3.10-894a31ef32562fb2cb0d2a6fab754ceac4c850f1.tar.gz
linux-3.10-894a31ef32562fb2cb0d2a6fab754ceac4c850f1.tar.bz2
linux-3.10-894a31ef32562fb2cb0d2a6fab754ceac4c850f1.zip
mmc: dw_mmc: move the platform specific init call
Current platform specific private data initialization call dw_mci_exynos_priv_init() can be used to do platform specific initialization of SMU and others in future. So the drv_data->init call has moved to dw_mci_probe(). Change-Id: I02dbf3360a283d7a25e171e1f97832c01837d5d1 Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com> Tested-by: Alim Akhtar <alim.akhtar@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/dw_mmc-pltfm.c10
-rw-r--r--drivers/mmc/host/dw_mmc.c9
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 41c27b74b00..a346a05669b 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -29,7 +29,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
{
struct dw_mci *host;
struct resource *regs;
- int ret;
host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL);
if (!host)
@@ -51,15 +50,8 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
if (IS_ERR(host->regs))
return PTR_ERR(host->regs);
- if (drv_data && drv_data->init) {
- ret = drv_data->init(host);
- if (ret)
- return ret;
- }
-
platform_set_drvdata(pdev, host);
- ret = dw_mci_probe(host);
- return ret;
+ return dw_mci_probe(host);
}
EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 30443952c1e..5dcb44ead94 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2270,6 +2270,15 @@ int dw_mci_probe(struct dw_mci *host)
host->bus_hz = clk_get_rate(host->ciu_clk);
}
+ if (drv_data && drv_data->init) {
+ ret = drv_data->init(host);
+ if (ret) {
+ dev_err(host->dev,
+ "implementation specific init failed\n");
+ goto err_clk_ciu;
+ }
+ }
+
if (drv_data && drv_data->setup_clock) {
ret = drv_data->setup_clock(host);
if (ret) {