History

net/smsc911x: Fix deferred probe for interrupt

The interrupt handler may not be available when smsc911x probes if the interrupt handler is a GPIO controller for example. Let's fix that by adding handling for -EPROBE_DEFER.

Tony Lindgren committed 11 years ago

Commit f892a841 parent 73e67421 file · +4 −1Browse files

Unified · Split

drivers/net/ethernet/smsc/smsc911x.c+4−1
@@ -2435,7 +2435,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev) · 2434 unmodified lines
2435 res_size = resource_size(res);2435 res_size = resource_size(res);
2436 2436
2437 irq = platform_get_irq(pdev, 0);2437 irq = platform_get_irq(pdev, 0);
2438 if (irq <= 0) {2438 if (irq == -EPROBE_DEFER) {
2439 retval = -EPROBE_DEFER;
2440 goto out_0;
2441 } else if (irq <= 0) {
2439 pr_warn("Could not allocate irq resource\n");2442 pr_warn("Could not allocate irq resource\n");
2440 retval = -ENODEV;2443 retval = -ENODEV;
2441 goto out_0;2444 goto out_0;