mmc: tmio: add tmio_mmc_host_alloc/free()
Current tmio_mmc driver is using tmio_mmc_data for driver/platform specific data/callback, and it is needed for tmio_mmc_host_probe() function. Because of this style, include/linux/mfd/tmio.h header has tmio driver/framework specific data which is not needed from platform. This patch adds new tmio_mmc_host_alloc/free() as cleanup preparation. tmio driver specific data/callback will be implemented in tmio_mmc_host, and platform specific data/callback will be implemented in tmio_mmc_data in this cleanup. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
此提交包含在:
@@ -92,10 +92,14 @@ static int tmio_mmc_probe(struct platform_device *pdev)
|
||||
pdata->bus_shift = resource_size(res) >> 10;
|
||||
pdata->flags |= TMIO_MMC_HAVE_HIGH_REG;
|
||||
|
||||
ret = tmio_mmc_host_probe(&host, pdev, pdata);
|
||||
if (ret)
|
||||
host = tmio_mmc_host_alloc(pdev);
|
||||
if (!host)
|
||||
goto cell_disable;
|
||||
|
||||
ret = tmio_mmc_host_probe(host, pdata);
|
||||
if (ret)
|
||||
goto host_free;
|
||||
|
||||
ret = request_irq(irq, tmio_mmc_irq, IRQF_TRIGGER_FALLING,
|
||||
dev_name(&pdev->dev), host);
|
||||
if (ret)
|
||||
@@ -108,6 +112,8 @@ static int tmio_mmc_probe(struct platform_device *pdev)
|
||||
|
||||
host_remove:
|
||||
tmio_mmc_host_remove(host);
|
||||
host_free:
|
||||
tmio_mmc_host_free(host);
|
||||
cell_disable:
|
||||
if (cell->disable)
|
||||
cell->disable(pdev);
|
||||
|
新增問題並參考
封鎖使用者