Skip to content

Commit

Permalink
Revert "net: netcp: remove dead code from the driver"
Browse files Browse the repository at this point in the history
As the probe sequence is not guaranteed contrary to the assumption
of the commit 2d8e276a9030, same has to be reverted.

commit 2d8e276a9030 ("net: netcp: remove dead code from the driver")

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Murali Karicheri authored and David S. Miller committed Apr 19, 2018
1 parent 7b647b9 commit c52b678
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/ti/netcp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,7 @@ static int netcp_probe(struct platform_device *pdev)
struct device_node *child, *interfaces;
struct netcp_device *netcp_device;
struct device *dev = &pdev->dev;
struct netcp_module *module;
int ret;

if (!node) {
Expand Down Expand Up @@ -2203,6 +2204,14 @@ static int netcp_probe(struct platform_device *pdev)
/* Add the device instance to the list */
list_add_tail(&netcp_device->device_list, &netcp_devices);

/* Probe & attach any modules already registered */
mutex_lock(&netcp_modules_lock);
for_each_netcp_module(module) {
ret = netcp_module_probe(netcp_device, module);
if (ret < 0)
dev_err(dev, "module(%s) probe failed\n", module->name);
}
mutex_unlock(&netcp_modules_lock);
return 0;

probe_quit_interface:
Expand Down

0 comments on commit c52b678

Please sign in to comment.