diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-25 01:24:39 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-12-18 13:56:57 +0100 |
commit | a3b05373e0e06dcb04adf2c50b58cd3feb5f8294 (patch) | |
tree | 19f76571fef49b21d2815a32168159a27b0e07a2 /drivers/mmc/host/tmio_mmc.c | |
parent | 4ce6281791676c134d3ae919edaf76da3cef1d76 (diff) |
mmc: tmio: set tmio_mmc_host to driver data
The remove, suspend, resume hooks need to get tmio_mmc_host. It is
tedious to call mmc_priv() to convert mmc_host to tmio_mmc_host.
We can directly set tmio_mmc_host to driver data.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-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.c')
-rw-r--r-- | drivers/mmc/host/tmio_mmc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 64b7e9f18361..ccfbc154ee5b 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -128,15 +128,11 @@ out: static int tmio_mmc_remove(struct platform_device *pdev) { const struct mfd_cell *cell = mfd_get_cell(pdev); - struct mmc_host *mmc = platform_get_drvdata(pdev); + struct tmio_mmc_host *host = platform_get_drvdata(pdev); - if (mmc) { - struct tmio_mmc_host *host = mmc_priv(mmc); - - tmio_mmc_host_remove(host); - if (cell->disable) - cell->disable(pdev); - } + tmio_mmc_host_remove(host); + if (cell->disable) + cell->disable(pdev); return 0; } |