netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Paul Chavent <paul.chavent@fnac.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	eric.dumazet@gmail.com, jkosina@suse.cz,
	richard.cochran@omicron.at, jpirko@redhat.com,
	davem@davemloft.net
Subject: Re: [PATCH] arm driver net macb
Date: Fri, 03 Sep 2010 15:41:25 +0200	[thread overview]
Message-ID: <4C80FB05.1040706@atmel.com> (raw)
In-Reply-To: <4C800BAF.2090003@fnac.net>

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

      reply	other threads:[~2010-09-03 13:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 20:40 [PATCH] arm driver net macb Paul Chavent
2010-09-03 13:41 ` Nicolas Ferre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C80FB05.1040706@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=jpirko@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.chavent@fnac.net \
    --cc=richard.cochran@omicron.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).