From: Roland Stigge <stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
To: Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: srinivas.bakki-3arQi8VN3Tc@public.gmane.org,
aletes.xgr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kevin.wells-3arQi8VN3Tc@public.gmane.org,
riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v9] input: keyboard: Add keys driver for the LPC32xx SoC
Date: Wed, 11 Jul 2012 09:49:04 +0200 [thread overview]
Message-ID: <4FFD2FF0.8030000@antcom.de> (raw)
In-Reply-To: <20120710205507.GA377-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
On 07/10/2012 10:55 PM, Dmitry Torokhov wrote:
> Hi Roland,
>
> On Tue, Jul 10, 2012 at 09:35:10PM +0200, Roland Stigge wrote:
>> This patch adds a driver for the key scan interface of the LPC32xx SoC
>>
>
> Could of more things that I had in my patch but forgot to specifically
> call out:
>
>> +
>> + /* Configure the key scanner */
>> + clk_prepare_enable(kscandat->clk);
>
> This may fail so we should handle errors.
>
>> + writel(kscandat->deb_clks, LPC32XX_KS_DEB(kscandat->kscan_base));
>> + writel(kscandat->scan_delay, LPC32XX_KS_SCAN_CTL(kscandat->kscan_base));
>> + writel(LPC32XX_KSCAN_FTST_USE32K_CLK,
>> + LPC32XX_KS_FAST_TST(kscandat->kscan_base));
>> + writel(kscandat->matrix_sz,
>> + LPC32XX_KS_MATRIX_DIM(kscandat->kscan_base));
>> + writel(1, LPC32XX_KS_IRQ(kscandat->kscan_base));
>> + clk_disable_unprepare(kscandat->clk);
>> +
>> + error = request_irq(irq, lpc32xx_kscan_irq, 0, pdev->name, kscandat);
>
> ...
>
>> +
>> + free_irq(platform_get_irq(pdev, 0), pdev);
>
> You are requesting IRQ with kscandat as an argument but freeing it with
> 'pdev' which will fail.
>
>> +
>> + if (kscandat->input->users) {
>> + /* Enable clock and clear IRQ */
>> + clk_prepare_enable(kscandat->clk);
>
> Need to handle errors here as well.
>
> Since I am partial to my rearrangement (basically I started preferring
> err_<action> style of error labels as they more explanatory than out2 or
> fail3 style of labels), could you try this version of my patch (on top
> of your v9 one). Third time is a charm maybe? :)
Yes, works fine!
Thanks!
Acked-by: Roland Stigge <stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
next prev parent reply other threads:[~2012-07-11 7:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 19:35 [PATCH v9] input: keyboard: Add keys driver for the LPC32xx SoC Roland Stigge
2012-07-10 20:55 ` Dmitry Torokhov
[not found] ` <20120710205507.GA377-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2012-07-11 7:49 ` Roland Stigge [this message]
2012-07-11 7:52 ` Dmitry Torokhov
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=4FFD2FF0.8030000@antcom.de \
--to=stigge-uj/7r2tj6vmzqb+pc5nmwq@public.gmane.org \
--cc=aletes.xgr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kevin.wells-3arQi8VN3Tc@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
--cc=riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=srinivas.bakki-3arQi8VN3Tc@public.gmane.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 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).