mmc: tmio: tmio_mmc_host has .clk_enable
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 13 Jan 2015 04:57:52 +0000 (04:57 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 20 Jan 2015 09:22:22 +0000 (10:22 +0100)
Current .clk_enable is implemented under tmio_mmc_data.
It goes to tmio_mmc_host by this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sh_mobile_sdhi.c
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_pio.c
include/linux/mfd/tmio.h

index 77ff0620912e0f6793d2318f9127dcd6a295f996..87af77dd660b9495de16a80d342cb2c5a0ccc854 100644 (file)
@@ -215,8 +215,8 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
 
        host->dma               = dma_priv;
        host->write16_hook      = sh_mobile_sdhi_write16_hook;
+       host->clk_enable        = sh_mobile_sdhi_clk_enable;
 
-       mmc_data->clk_enable = sh_mobile_sdhi_clk_enable;
        mmc_data->clk_disable = sh_mobile_sdhi_clk_disable;
        mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED;
        mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk;
index 3fa96b11f76cbab665a47e0b705e3c4eff359a23..5cd298665b946ed05f074d0438c358cb4fa2ca3e 100644 (file)
@@ -96,6 +96,7 @@ struct tmio_mmc_host {
        bool                    sdio_irq_enabled;
 
        int (*write16_hook)(struct tmio_mmc_host *host, int addr);
+       int (*clk_enable)(struct platform_device *pdev, unsigned int *f);
 };
 
 struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev);
index 58f4e47aac8c7e4a7a7d58a58150c4c2081f7c6c..38bcf0ca31c516ad45ab3401fb1617200d4af336 100644 (file)
@@ -835,13 +835,12 @@ fail:
 static int tmio_mmc_clk_update(struct tmio_mmc_host *host)
 {
        struct mmc_host *mmc = host->mmc;
-       struct tmio_mmc_data *pdata = host->pdata;
        int ret;
 
-       if (!pdata->clk_enable)
+       if (!host->clk_enable)
                return -ENOTSUPP;
 
-       ret = pdata->clk_enable(host->pdev, &mmc->f_max);
+       ret = host->clk_enable(host->pdev, &mmc->f_max);
        if (!ret)
                mmc->f_min = mmc->f_max / 512;
 
index 0872ca1e5dc2df6178f5447949d136a959b96296..472587a02a4219bd79434282b22a7b4fc6c5e1d3 100644 (file)
@@ -126,7 +126,6 @@ struct tmio_mmc_data {
        void (*set_pwr)(struct platform_device *host, int state);
        void (*set_clk_div)(struct platform_device *host, int state);
        /* clock management callbacks */
-       int (*clk_enable)(struct platform_device *pdev, unsigned int *f);
        void (*clk_disable)(struct platform_device *pdev);
        int (*multi_io_quirk)(struct mmc_card *card,
                              unsigned int direction, int blk_size);