diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-01-12 23:59:24 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-20 04:23:36 -0500 |
commit | 010f4aa758f437647799b1fd677a5e2cf31714e9 (patch) | |
tree | edf8b9dc3dade96947389b6ce27b910eab8ed636 | |
parent | 361936ef037b44dd10da1c25d426ba54796b183c (diff) |
mmc: sh_mobile_sdhi: remove .init/.cleanup
No one is using .init/.cleanup callback function.
Let's remove these.
sdhi_ops and .cd_wakeup are also removed
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sh_mobile_sdhi.c | 26 | ||||
-rw-r--r-- | include/linux/mmc/sh_mobile_sdhi.h | 15 |
2 files changed, 1 insertions, 40 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index c06e93b77995..48a3be804cc0 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c | |||
@@ -156,15 +156,6 @@ static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card, | |||
156 | return blk_size; | 156 | return blk_size; |
157 | } | 157 | } |
158 | 158 | ||
159 | static void sh_mobile_sdhi_cd_wakeup(const struct platform_device *pdev) | ||
160 | { | ||
161 | mmc_detect_change(platform_get_drvdata(pdev), msecs_to_jiffies(100)); | ||
162 | } | ||
163 | |||
164 | static const struct sh_mobile_sdhi_ops sdhi_ops = { | ||
165 | .cd_wakeup = sh_mobile_sdhi_cd_wakeup, | ||
166 | }; | ||
167 | |||
168 | static int sh_mobile_sdhi_probe(struct platform_device *pdev) | 159 | static int sh_mobile_sdhi_probe(struct platform_device *pdev) |
169 | { | 160 | { |
170 | const struct of_device_id *of_id = | 161 | const struct of_device_id *of_id = |
@@ -192,19 +183,11 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
192 | mmc_data = &priv->mmc_data; | 183 | mmc_data = &priv->mmc_data; |
193 | dma_priv = &priv->dma_priv; | 184 | dma_priv = &priv->dma_priv; |
194 | 185 | ||
195 | if (p) { | ||
196 | if (p->init) { | ||
197 | ret = p->init(pdev, &sdhi_ops); | ||
198 | if (ret) | ||
199 | return ret; | ||
200 | } | ||
201 | } | ||
202 | |||
203 | priv->clk = devm_clk_get(&pdev->dev, NULL); | 186 | priv->clk = devm_clk_get(&pdev->dev, NULL); |
204 | if (IS_ERR(priv->clk)) { | 187 | if (IS_ERR(priv->clk)) { |
205 | ret = PTR_ERR(priv->clk); | 188 | ret = PTR_ERR(priv->clk); |
206 | dev_err(&pdev->dev, "cannot get clock: %d\n", ret); | 189 | dev_err(&pdev->dev, "cannot get clock: %d\n", ret); |
207 | goto eclkget; | 190 | goto eprobe; |
208 | } | 191 | } |
209 | 192 | ||
210 | host = tmio_mmc_host_alloc(pdev); | 193 | host = tmio_mmc_host_alloc(pdev); |
@@ -359,9 +342,6 @@ eirq: | |||
359 | efree: | 342 | efree: |
360 | tmio_mmc_host_free(host); | 343 | tmio_mmc_host_free(host); |
361 | eprobe: | 344 | eprobe: |
362 | eclkget: | ||
363 | if (p && p->cleanup) | ||
364 | p->cleanup(pdev); | ||
365 | return ret; | 345 | return ret; |
366 | } | 346 | } |
367 | 347 | ||
@@ -369,13 +349,9 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev) | |||
369 | { | 349 | { |
370 | struct mmc_host *mmc = platform_get_drvdata(pdev); | 350 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
371 | struct tmio_mmc_host *host = mmc_priv(mmc); | 351 | struct tmio_mmc_host *host = mmc_priv(mmc); |
372 | struct sh_mobile_sdhi_info *p = pdev->dev.platform_data; | ||
373 | 352 | ||
374 | tmio_mmc_host_remove(host); | 353 | tmio_mmc_host_remove(host); |
375 | 354 | ||
376 | if (p && p->cleanup) | ||
377 | p->cleanup(pdev); | ||
378 | |||
379 | return 0; | 355 | return 0; |
380 | } | 356 | } |
381 | 357 | ||
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index 68927ae50845..da77e5e2041d 100644 --- a/include/linux/mmc/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h | |||
@@ -3,20 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | struct platform_device; | ||
7 | |||
8 | #define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect" | 6 | #define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect" |
9 | #define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" | 7 | #define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" |
10 | #define SH_MOBILE_SDHI_IRQ_SDIO "sdio" | 8 | #define SH_MOBILE_SDHI_IRQ_SDIO "sdio" |
11 | 9 | ||
12 | /** | ||
13 | * struct sh_mobile_sdhi_ops - SDHI driver callbacks | ||
14 | * @cd_wakeup: trigger a card-detection run | ||
15 | */ | ||
16 | struct sh_mobile_sdhi_ops { | ||
17 | void (*cd_wakeup)(const struct platform_device *pdev); | ||
18 | }; | ||
19 | |||
20 | struct sh_mobile_sdhi_info { | 10 | struct sh_mobile_sdhi_info { |
21 | int dma_slave_tx; | 11 | int dma_slave_tx; |
22 | int dma_slave_rx; | 12 | int dma_slave_rx; |
@@ -25,11 +15,6 @@ struct sh_mobile_sdhi_info { | |||
25 | unsigned long tmio_caps2; | 15 | unsigned long tmio_caps2; |
26 | u32 tmio_ocr_mask; /* available MMC voltages */ | 16 | u32 tmio_ocr_mask; /* available MMC voltages */ |
27 | unsigned int cd_gpio; | 17 | unsigned int cd_gpio; |
28 | |||
29 | /* callbacks for board specific setup code */ | ||
30 | int (*init)(struct platform_device *pdev, | ||
31 | const struct sh_mobile_sdhi_ops *ops); | ||
32 | void (*cleanup)(struct platform_device *pdev); | ||
33 | }; | 18 | }; |
34 | 19 | ||
35 | #endif /* LINUX_MMC_SH_MOBILE_SDHI_H */ | 20 | #endif /* LINUX_MMC_SH_MOBILE_SDHI_H */ |