From: Jiri Slaby <jirislaby@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Subject: Re: [PATCH 5/5] Input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors
Date: Tue, 03 Mar 2009 21:29:42 +0100 [thread overview]
Message-ID: <49AD9336.6070209@gmail.com> (raw)
In-Reply-To: <1236104684-30214-5-git-send-email-broonie@opensource.wolfsonmicro.com>
On 3.3.2009 19:24, Mark Brown wrote:
> +static irqreturn_t at32_wm97xx_channel_b_interrupt(int irq, void *dev_id)
> +{
> + struct at32_wm97xx *at32_wm97xx = dev_id;
> + struct wm97xx *wm = at32_wm97xx->wm;
> + int status = ac97c_readl(at32_wm97xx, CBSR);
> + int retval = IRQ_NONE;
Just a nit, irqreturn_t will become enum one day AFAIK. Use irqreturn_t
which is guaranteed to be the proper type instead. This rather a
suggestion for followup fixup.
> +static int __init at32_wm97xx_probe(struct platform_device *pdev)
> +{
> + struct wm97xx *wm = platform_get_drvdata(pdev);
> + struct at32_wm97xx *at32_wm97xx;
> + int ret;
> +
> + at32_wm97xx = kzalloc(sizeof(struct at32_wm97xx), GFP_KERNEL);
> + if (!at32_wm97xx) {
> + dev_dbg(&pdev->dev, "out of memory\n");
> + return -ENOMEM;
> + }
> +
> + at32_wm97xx->wm = wm;
> + at32_wm97xx->regs = (void *)AT32_WM97XX_AC97C_IOMEM;
> + at32_wm97xx->ac97c_irq = AT32_WM97XX_AC97C_IRQ;
> + at32_wm97xx->gpio_pen = at32_gpio_line;
> + at32_wm97xx->gpio_irq = gpio_to_irq(at32_wm97xx->gpio_pen);
> +
> + setup_timer(&at32_wm97xx->pen_timer, at32_wm97xx_pen_timer,
> + (unsigned long)at32_wm97xx);
> +
> + ret = request_irq(at32_wm97xx->ac97c_irq,
> + at32_wm97xx_channel_b_interrupt,
> + IRQF_SHARED, "at32-wm97xx-ch-b", at32_wm97xx);
> + if (ret) {
> + dev_dbg(&pdev->dev, "could not request ac97c irq\n");
at32_wm97xx leak. I didn't notice last time.
> + return ret;
> + }
> +
> + platform_set_drvdata(pdev, at32_wm97xx);
> +
> + return wm97xx_register_mach_ops(wm,&at32_mach_ops);
On failure, this will still "leak" irq, I suppose this is what you
referred as "fix later" in 0/5.
next prev parent reply other threads:[~2009-03-03 20:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 18:24 [PATCH 0/5] WM97xx updates Mark Brown
2009-03-03 18:24 ` [PATCH 1/5] Input: wm97xx: add BTN_TOUCH event to wm97xx to use it with Android Mark Brown
2009-03-03 18:24 ` [PATCH 2/5] Input: add BTN_TOUCH event Mark Brown
2009-03-03 18:24 ` [PATCH 3/5] Input: Use disable_irq_nosync() for Mainstone Mark Brown
2009-03-03 18:24 ` [PATCH 4/5] Input: Accelerated touchscreen support for Marvell Zylonite Mark Brown
2009-03-03 18:24 ` [PATCH 5/5] Input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors Mark Brown
2009-03-03 20:29 ` Jiri Slaby [this message]
2009-03-04 9:15 ` [PATCH 0/5] WM97xx updates Dmitry Torokhov
2009-03-04 9:26 ` Hans-Christian Egtvedt
[not found] ` <20090304105358.GA32107@rakim.wolfsonmicro.main>
2009-03-04 11:29 ` Hans-Christian Egtvedt
2009-03-04 14:32 ` Mark Brown
2009-03-09 15:48 ` Hans-Christian Egtvedt
2009-03-09 15:57 ` Jiri Slaby
-- strict thread matches above, loose matches on Subject: below --
2009-06-10 19:48 [patch 5/5] input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors akpm
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=49AD9336.6070209@gmail.com \
--to=jirislaby@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hcegtvedt@atmel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.