Commit bc45719c authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Ulf Hansson

mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument

Drivers need to set up various struct members for tmio_mmc_host before
calling tmio_mmc_host_probe().  Do likewise for host->dma_ops instead
of passing it as a function argument.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 6fb294f7
...@@ -532,6 +532,7 @@ int renesas_sdhi_probe(struct platform_device *pdev, ...@@ -532,6 +532,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
host->clk_update = renesas_sdhi_clk_update; host->clk_update = renesas_sdhi_clk_update;
host->clk_disable = renesas_sdhi_clk_disable; host->clk_disable = renesas_sdhi_clk_disable;
host->multi_io_quirk = renesas_sdhi_multi_io_quirk; host->multi_io_quirk = renesas_sdhi_multi_io_quirk;
host->dma_ops = dma_ops;
/* SDR speeds are only available on Gen2+ */ /* SDR speeds are only available on Gen2+ */
if (mmc_data->flags & TMIO_MMC_MIN_RCAR2) { if (mmc_data->flags & TMIO_MMC_MIN_RCAR2) {
...@@ -575,7 +576,7 @@ int renesas_sdhi_probe(struct platform_device *pdev, ...@@ -575,7 +576,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
if (ret) if (ret)
goto efree; goto efree;
ret = tmio_mmc_host_probe(host, dma_ops); ret = tmio_mmc_host_probe(host);
if (ret < 0) if (ret < 0)
goto edisclk; goto edisclk;
......
...@@ -104,7 +104,7 @@ static int tmio_mmc_probe(struct platform_device *pdev) ...@@ -104,7 +104,7 @@ static int tmio_mmc_probe(struct platform_device *pdev)
host->mmc->f_max = pdata->hclk; host->mmc->f_max = pdata->hclk;
host->mmc->f_min = pdata->hclk / 512; host->mmc->f_min = pdata->hclk / 512;
ret = tmio_mmc_host_probe(host, NULL); ret = tmio_mmc_host_probe(host);
if (ret) if (ret)
goto host_free; goto host_free;
......
...@@ -198,8 +198,7 @@ struct tmio_mmc_host { ...@@ -198,8 +198,7 @@ struct tmio_mmc_host {
struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev, struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev,
struct tmio_mmc_data *pdata); struct tmio_mmc_data *pdata);
void tmio_mmc_host_free(struct tmio_mmc_host *host); void tmio_mmc_host_free(struct tmio_mmc_host *host);
int tmio_mmc_host_probe(struct tmio_mmc_host *host, int tmio_mmc_host_probe(struct tmio_mmc_host *host);
const struct tmio_mmc_dma_ops *dma_ops);
void tmio_mmc_host_remove(struct tmio_mmc_host *host); void tmio_mmc_host_remove(struct tmio_mmc_host *host);
void tmio_mmc_do_data_irq(struct tmio_mmc_host *host); void tmio_mmc_do_data_irq(struct tmio_mmc_host *host);
......
...@@ -1195,8 +1195,7 @@ void tmio_mmc_host_free(struct tmio_mmc_host *host) ...@@ -1195,8 +1195,7 @@ void tmio_mmc_host_free(struct tmio_mmc_host *host)
} }
EXPORT_SYMBOL_GPL(tmio_mmc_host_free); EXPORT_SYMBOL_GPL(tmio_mmc_host_free);
int tmio_mmc_host_probe(struct tmio_mmc_host *_host, int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
const struct tmio_mmc_dma_ops *dma_ops)
{ {
struct platform_device *pdev = _host->pdev; struct platform_device *pdev = _host->pdev;
struct tmio_mmc_data *pdata = _host->pdata; struct tmio_mmc_data *pdata = _host->pdata;
...@@ -1296,7 +1295,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, ...@@ -1296,7 +1295,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
INIT_WORK(&_host->done, tmio_mmc_done_work); INIT_WORK(&_host->done, tmio_mmc_done_work);
/* See if we also get DMA */ /* See if we also get DMA */
_host->dma_ops = dma_ops;
tmio_mmc_request_dma(_host, pdata); tmio_mmc_request_dma(_host, pdata);
pm_runtime_set_active(&pdev->dev); pm_runtime_set_active(&pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment