aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sh_mobile_sdhi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/sh_mobile_sdhi.c')
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 0bdc146178db..524a7f773820 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -117,13 +117,12 @@ static const struct sh_mobile_sdhi_ops sdhi_ops = {
117 .cd_wakeup = sh_mobile_sdhi_cd_wakeup, 117 .cd_wakeup = sh_mobile_sdhi_cd_wakeup,
118}; 118};
119 119
120static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev) 120static int sh_mobile_sdhi_probe(struct platform_device *pdev)
121{ 121{
122 struct sh_mobile_sdhi *priv; 122 struct sh_mobile_sdhi *priv;
123 struct tmio_mmc_data *mmc_data; 123 struct tmio_mmc_data *mmc_data;
124 struct sh_mobile_sdhi_info *p = pdev->dev.platform_data; 124 struct sh_mobile_sdhi_info *p = pdev->dev.platform_data;
125 struct tmio_mmc_host *host; 125 struct tmio_mmc_host *host;
126 char clk_name[8];
127 int irq, ret, i = 0; 126 int irq, ret, i = 0;
128 bool multiplexed_isr = true; 127 bool multiplexed_isr = true;
129 128
@@ -144,11 +143,10 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
144 } 143 }
145 } 144 }
146 145
147 snprintf(clk_name, sizeof(clk_name), "sdhi%d", pdev->id); 146 priv->clk = clk_get(&pdev->dev, NULL);
148 priv->clk = clk_get(&pdev->dev, clk_name);
149 if (IS_ERR(priv->clk)) { 147 if (IS_ERR(priv->clk)) {
150 dev_err(&pdev->dev, "cannot get clock \"%s\"\n", clk_name);
151 ret = PTR_ERR(priv->clk); 148 ret = PTR_ERR(priv->clk);
149 dev_err(&pdev->dev, "cannot get clock: %d\n", ret);
152 goto eclkget; 150 goto eclkget;
153 } 151 }
154 152
@@ -250,7 +248,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
250 dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n", 248 dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",
251 mmc_hostname(host->mmc), (unsigned long) 249 mmc_hostname(host->mmc), (unsigned long)
252 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), 250 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
253 mmc_data->hclk / 1000000); 251 host->mmc->f_max / 1000000);
254 252
255 return ret; 253 return ret;
256 254
@@ -330,7 +328,7 @@ static struct platform_driver sh_mobile_sdhi_driver = {
330 .of_match_table = sh_mobile_sdhi_of_match, 328 .of_match_table = sh_mobile_sdhi_of_match,
331 }, 329 },
332 .probe = sh_mobile_sdhi_probe, 330 .probe = sh_mobile_sdhi_probe,
333 .remove = __devexit_p(sh_mobile_sdhi_remove), 331 .remove = sh_mobile_sdhi_remove,
334}; 332};
335 333
336module_platform_driver(sh_mobile_sdhi_driver); 334module_platform_driver(sh_mobile_sdhi_driver);