lkml.org 
[lkml]   [2010]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm driver net macb
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@fnac.net>

[..]

> @@ -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



\
 
 \ /
  Last update: 2010-09-03 15:45    [W:0.031 / U:24.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site