From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Stanley.Miao" <stanley.miao@windriver.com>
Cc: netdev@vger.kernel.org, steve.glendinning@smsc.com,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH] smsc911x: add irq_flags in smsc911x_platform_config.
Date: Wed, 14 Jan 2009 17:06:33 +0000 [thread overview]
Message-ID: <20090114170633.GG22976@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1231910512-8420-1-git-send-email-stanley.miao@windriver.com>
On Wed, Jan 14, 2009 at 01:21:52PM +0800, Stanley.Miao wrote:
> When calling request IRQ it is desirable to allow platforms
> to specific flags for the call to request_irq. Adding irq_flags
> to smsc911x_platform_config allows these flags to be passed.
>
> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
> drivers/net/smsc911x.c | 6 ++++--
> include/linux/smsc911x.h | 1 +
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
> index f513bdf..1092517 100644
> --- a/drivers/net/smsc911x.c
> +++ b/drivers/net/smsc911x.c
> @@ -1896,6 +1896,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
> unsigned int intcfg = 0;
> int res_size;
> int retval;
> + irq_flags;
This looks wrong.
> DECLARE_MAC_BUF(mac);
>
> pr_info("%s: Driver version %s.\n", SMSC_CHIPNAME, SMSC_DRV_VERSION);
> @@ -1968,8 +1969,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
> smsc911x_reg_write(pdata, INT_EN, 0);
> smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF);
>
> - retval = request_irq(dev->irq, smsc911x_irqhandler, IRQF_DISABLED,
> - dev->name, dev);
> + irq_flags = IRQF_DISABLED | pdata->config.irq_flags;
> + retval = request_irq(dev->irq, smsc911x_irqhandler, irq_flags,
> + dev->name, dev);
If you need shared interrupt support, pass always pass IRQF_SHARED.
IRQF_SHARED and IRQF_DISABLED are a property of the driver.
Edge/level configuration should come from the struct resource.
next prev parent reply other threads:[~2009-01-14 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 5:21 [PATCH] smsc911x: add irq_flags in smsc911x_platform_config Stanley.Miao
2009-01-14 17:06 ` Russell King - ARM Linux [this message]
2009-01-15 2:16 ` stanley.miao
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=20090114170633.GG22976@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=stanley.miao@windriver.com \
--cc=steve.glendinning@smsc.com \
/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).