Skip to content

Commit c52b678

Browse files
Murali Karicheridavem330
authored andcommitted
Revert "net: netcp: remove dead code from the driver"
As the probe sequence is not guaranteed contrary to the assumption of the commit 2d8e276, same has to be reverted. commit 2d8e276 ("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>
1 parent 7b647b9 commit c52b678

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/net/ethernet/ti/netcp_core.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,7 @@ static int netcp_probe(struct platform_device *pdev)
21552155
struct device_node *child, *interfaces;
21562156
struct netcp_device *netcp_device;
21572157
struct device *dev = &pdev->dev;
2158+
struct netcp_module *module;
21582159
int ret;
21592160

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

2207+
/* Probe & attach any modules already registered */
2208+
mutex_lock(&netcp_modules_lock);
2209+
for_each_netcp_module(module) {
2210+
ret = netcp_module_probe(netcp_device, module);
2211+
if (ret < 0)
2212+
dev_err(dev, "module(%s) probe failed\n", module->name);
2213+
}
2214+
mutex_unlock(&netcp_modules_lock);
22062215
return 0;
22072216

22082217
probe_quit_interface:

0 commit comments

Comments
 (0)