提交 01126856 编写于 作者: A Andy Shevchenko 提交者: Vinod Koul

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 a725dcc0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册