From e3e020f8acbd39a6feb1b6903725aaf658b0fec4 Mon Sep 17 00:00:00 2001 From: "Manjunathappa, Prakash" Date: Tue, 5 Feb 2013 17:52:24 +0530 Subject: mmc: davinci_mmc: allow driver to work without DMA resource Do not return probe failure with missing DMA resources, allow driver to work in PIO mode. Tested on da850-evm by mounting partition followed by file creation and deletion. Signed-off-by: Manjunathappa, Prakash Tested-by: Sekhar Nori Signed-off-by: Chris Ball --- drivers/mmc/host/davinci_mmc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/mmc/host/davinci_mmc.c') diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 20636772c09..27123f8b704 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1190,13 +1190,15 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) r = platform_get_resource(pdev, IORESOURCE_DMA, 0); if (!r) - goto out; - host->rxdma = r->start; + dev_warn(&pdev->dev, "RX DMA resource not specified\n"); + else + host->rxdma = r->start; r = platform_get_resource(pdev, IORESOURCE_DMA, 1); if (!r) - goto out; - host->txdma = r->start; + dev_warn(&pdev->dev, "TX DMA resource not specified\n"); + else + host->txdma = r->start; host->mem_res = mem; host->base = ioremap(mem->start, mem_size); -- cgit v1.2.3-70-g09d2 From d4bf63251c530be61ae7906dc67ace3af36ff3db Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Tue, 5 Mar 2013 12:53:23 +0900 Subject: mmc: davinci_mmc: use module_platform_driver_probe() This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han Signed-off-by: Chris Ball --- drivers/mmc/host/davinci_mmc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/mmc/host/davinci_mmc.c') diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 27123f8b704..4fdc159a020 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1412,18 +1412,7 @@ static struct platform_driver davinci_mmcsd_driver = { .remove = __exit_p(davinci_mmcsd_remove), }; -static int __init davinci_mmcsd_init(void) -{ - return platform_driver_probe(&davinci_mmcsd_driver, - davinci_mmcsd_probe); -} -module_init(davinci_mmcsd_init); - -static void __exit davinci_mmcsd_exit(void) -{ - platform_driver_unregister(&davinci_mmcsd_driver); -} -module_exit(davinci_mmcsd_exit); +module_platform_driver_probe(davinci_mmcsd_driver, davinci_mmcsd_probe); MODULE_AUTHOR("Texas Instruments India"); MODULE_LICENSE("GPL"); -- cgit v1.2.3-70-g09d2