* [PATCH] dw_dmac: call .probe after we have a device in place
@ 2012-11-06 11:53 Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2012-11-06 11:53 UTC (permalink / raw)
To: viresh kumar, Vinod Koul, linux-kernel, spear-devel; +Cc: Andy Shevchenko
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 <andriy.shevchenko@linux.intel.com>
---
drivers/dma/dw_dmac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 2c8096d..b0b301b 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1829,6 +1829,7 @@ MODULE_DEVICE_TABLE(of, dw_dma_id_table);
#endif
static struct platform_driver dw_driver = {
+ .probe = dw_probe,
.remove = __devexit_p(dw_remove),
.shutdown = dw_shutdown,
.driver = {
@@ -1840,7 +1841,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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-06 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 11:53 [PATCH] dw_dmac: call .probe after we have a device in place Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox