net: netcp: support probe deferral

The netcp driver shouldn't proceed until the knav qmss and dma
devices are ready. So return -EPROBE_DEFER if these devices are not
ready.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Murali Karicheri 2018-04-17 17:30:40 -04:00 committed by David S. Miller
parent c52b6782d0
commit 21f706bb10
1 changed files with 4 additions and 0 deletions

View File

@ -2158,6 +2158,10 @@ static int netcp_probe(struct platform_device *pdev)
struct netcp_module *module;
int ret;
if (!knav_dma_device_ready() ||
!knav_qmss_device_ready())
return -EPROBE_DEFER;
if (!node) {
dev_err(dev, "could not find device info\n");
return -ENODEV;