From: Andy Shevchenko Date: Thu, 10 Jan 2013 08:53:02 +0000 (+0200) Subject: dw_dmac: call .probe after we have a device in place X-Git-Tag: v3.9-rc1~12^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01126856ff4f7d4cc5899c208fd4d3c7d0a2b83a;p=platform%2Fupstream%2Fkernel-adaptation-pc.git dw_dmac: call .probe after we have a device in place If we don't yet have the platform device for the driver when it is being loaded we fail to probe the driver. So instead of calling probe() directly we call platform_driver_register(). It will call the probe() immediately if we have the device but also makes the driver to work on platforms where the platform device is created later. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index ca996bc..e554027 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -1858,6 +1858,7 @@ MODULE_DEVICE_TABLE(of, dw_dma_id_table); #endif static struct platform_driver dw_driver = { + .probe = dw_probe, .remove = dw_remove, .shutdown = dw_shutdown, .driver = { @@ -1869,7 +1870,7 @@ static struct platform_driver dw_driver = { static int __init dw_init(void) { - return platform_driver_probe(&dw_driver, dw_probe); + return platform_driver_register(&dw_driver); } subsys_initcall(dw_init);