diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-25 01:24:47 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-12-19 08:50:04 +0100 |
commit | 058db2868cd88b5474f26974253407fcbe932c22 (patch) | |
tree | b45a24da94c8e649d15a1da91e3025144d54a9d4 /drivers/mmc/host/renesas_sdhi_internal_dmac.c | |
parent | 2487e7efc9e13bd11fdc86f1ac12a5a45c4af778 (diff) | |
download | lwn-058db2868cd88b5474f26974253407fcbe932c22.tar.gz lwn-058db2868cd88b5474f26974253407fcbe932c22.zip |
mmc: tmio, renesas_sdhi: move struct tmio_mmc_dma to renesas_sdhi.h
struct tmio_mmc_dma looks like TMIO core data, but in fact, Renesas
private data. Move it to renesas_sdhi.h (probably, it is better to
rename it to renesas_sdhi_dma, or squash it into struct renesas_sdhi).
I also moved struct renesas_sdhi and host_to_priv() to that header
because they are necessary to convert the tmio_mmc_host pointer into
the renesas_sdhi pointer.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/renesas_sdhi_internal_dmac.c')
-rw-r--r-- | drivers/mmc/host/renesas_sdhi_internal_dmac.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 396ae8a1c250..9498decf3165 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -103,6 +103,8 @@ renesas_sdhi_internal_dmac_dm_write(struct tmio_mmc_host *host, static void renesas_sdhi_internal_dmac_enable_dma(struct tmio_mmc_host *host, bool enable) { + struct renesas_sdhi *priv = host_to_priv(host); + if (!host->chan_tx || !host->chan_rx) return; @@ -110,8 +112,8 @@ renesas_sdhi_internal_dmac_enable_dma(struct tmio_mmc_host *host, bool enable) renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1, INFO1_CLEAR); - if (host->dma->enable) - host->dma->enable(host, enable); + if (priv->dma_priv.enable) + priv->dma_priv.enable(host, enable); } static void |