Skip to content

Commit

Permalink
bcm63xx_enet: do not rely on probe order
Browse files Browse the repository at this point in the history
Do not rely on the shared device being probed before the enet(sw)
devices. This makes it easier to eventually move out the shared
device as a dma controller driver (what it should be).

Signed-off-by: Jonas Gorski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
KanjiMonster authored and davem330 committed Oct 2, 2017
1 parent d6213c1 commit 527a487
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/net/ethernet/broadcom/bcm63xx_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1722,10 +1722,8 @@ static int bcm_enet_probe(struct platform_device *pdev)
const char *clk_name;
int i, ret;

/* stop if shared driver failed, assume driver->probe will be
* called in the same order we register devices (correct ?) */
if (!bcm_enet_shared_base[0])
return -ENODEV;
return -EPROBE_DEFER;

res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
Expand Down Expand Up @@ -2696,11 +2694,8 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
struct resource *res_mem;
int ret, irq_rx, irq_tx;

/* stop if shared driver failed, assume driver->probe will be
* called in the same order we register devices (correct ?)
*/
if (!bcm_enet_shared_base[0])
return -ENODEV;
return -EPROBE_DEFER;

res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq_rx = platform_get_irq(pdev, 0);
Expand Down

0 comments on commit 527a487

Please sign in to comment.