mmc: tmio, renesas_sdhi: set mmc_host_ops hooks directly
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 24 Nov 2017 16:24:42 +0000 (01:24 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 18 Dec 2017 12:56:58 +0000 (13:56 +0100)
Drivers can set any mmc_host_ops hooks between tmio_mmc_host_alloc()
and tmio_mmc_host_probe().  Remove duplicated hooks in tmio_mmc_host.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_core.c
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_core.c

index 9baf4d1..267e2e0 100644 (file)
@@ -549,8 +549,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
        /* SDR speeds are only available on Gen2+ */
        if (mmc_data->flags & TMIO_MMC_MIN_RCAR2) {
                /* card_busy caused issues on r8a73a4 (pre-Gen2) CD-less SDHI */
-               host->card_busy = renesas_sdhi_card_busy;
-               host->start_signal_voltage_switch =
+               host->ops.card_busy = renesas_sdhi_card_busy;
+               host->ops.start_signal_voltage_switch =
                        renesas_sdhi_start_signal_voltage_switch;
        }
 
index 405547f..dd40b96 100644 (file)
@@ -186,9 +186,6 @@ struct tmio_mmc_host {
        void (*clk_disable)(struct tmio_mmc_host *host);
        int (*multi_io_quirk)(struct mmc_card *card,
                              unsigned int direction, int blk_size);
-       int (*card_busy)(struct mmc_host *mmc);
-       int (*start_signal_voltage_switch)(struct mmc_host *mmc,
-                                          struct mmc_ios *ios);
        int (*write16_hook)(struct tmio_mmc_host *host, int addr);
        void (*hw_reset)(struct tmio_mmc_host *host);
        void (*prepare_tuning)(struct tmio_mmc_host *host, unsigned long tap);
index ea5181d..1abe83b 100644 (file)
@@ -1205,10 +1205,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
        if (ret < 0)
                return ret;
 
-       _host->ops.card_busy = _host->card_busy;
-       _host->ops.start_signal_voltage_switch =
-               _host->start_signal_voltage_switch;
-
        mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
        mmc->caps2 |= pdata->capabilities2;
        mmc->max_segs = pdata->max_segs ? : 32;