Re: [PATCH] arm driver net macb

From: Nicolas Ferre
Date: Fri Sep 03 2010 - 09:42:31 EST


Le 02/09/2010 22:40, Paul Chavent :
> When listing processes on a system with SOFT/HARD_IRQ enabled, the name
> of the ethernet device is [irq/eth%d] (instead of [irq/eth0] for example).
>
> This patch call the request_irq function after having initialized the
> name of the device.
>
> Signed-off-by: Paul Chavent <paul.chavent@xxxxxxxx>

[..]

> @@ -1214,13 +1281,23 @@
> err = register_netdev(dev);
> if (err) {
> dev_err(&pdev->dev, "Cannot register net device, aborting.\n");
> - goto err_out_free_irq;
> + goto err_out_iounmap;
> }
>
> if (macb_mii_init(bp) != 0) {
> goto err_out_unregister_netdev;
> }
>
> + dev->irq = platform_get_irq(pdev, 0);
> + err = request_irq(dev->irq, macb_interrupt, IRQF_SAMPLE_RANDOM,
> + dev->name, dev);
> + if (err) {
> + printk(KERN_ERR
> + "%s: Unable to request IRQ %d (error %d)\n",
> + dev->name, dev->irq, err);
> + goto err_out_unregister_netdev;
> + }
> +

The string is modified in register_netdev() so why don't you deal
with IRQ just after it? I would have placed the code snippet
before macb_mii_init(): what do you think about this?

Best regards,
--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/