summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.h
diff options
context:
space:
mode:
authorMasahiro Yamada2017-11-24 17:24:41 +0100
committerUlf Hansson2017-12-18 13:56:58 +0100
commitc055fc75c1757b220108489038cfe60496b13865 (patch)
tree9e7156d1f75f4d799b0e17e367a60a96ad6e6f92 /drivers/mmc/host/tmio_mmc.h
parentmmc: tmio: use devm_ioremap_resource() instead of devm_ioremap() (diff)
downloadkernel-qcow2-linux-c055fc75c1757b220108489038cfe60496b13865.tar.gz
kernel-qcow2-linux-c055fc75c1757b220108489038cfe60496b13865.tar.xz
kernel-qcow2-linux-c055fc75c1757b220108489038cfe60496b13865.zip
mmc: tmio: move mmc_host_ops to struct tmio_mmc_host from static data
Currently, tmio_mmc_ops is static data and tmio_mmc_host_probe() updates some hooks in the static data. This is a problem when two or more instances call tmio_mmc_host_probe() and each of them requests to use its own card_busy/start_signal_voltage_switch. We can borrow a solution from sdhci_alloc_host(). Copy the whole ops structure to host->mmc_host_ops, then override the hooks in malloc'ed data. Constify tmio_mmc_ops since it is now a template ops used by default. 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>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
-rw-r--r--drivers/mmc/host/tmio_mmc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index cd3d7c8d24bf..405547f88421 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -134,6 +134,7 @@ struct tmio_mmc_host {
struct mmc_request *mrq;
struct mmc_data *data;
struct mmc_host *mmc;
+ struct mmc_host_ops ops;
/* Callbacks for clock / power control */
void (*set_pwr)(struct platform_device *host, int state);