[PATCH 1/7] Input: pmic8xxx-pwrkey - Pass input device directly to interrupt
Stephen Boyd
sboyd at codeaurora.org
Mon Dec 16 14:59:10 EST 2013
On 12/15, Dmitry Torokhov wrote:
> Hi Stephen,
>
> On Tue, Dec 10, 2013 at 03:43:10PM -0800, Stephen Boyd wrote:
> > Instead of passing the pointer to the container structure just
> > pass the input device here. This saves a dereference in the fast
> > path.
> >
> > Signed-off-by: Stephen Boyd <sboyd at codeaurora.org>
> > ---
> > drivers/input/misc/pmic8xxx-pwrkey.c | 22 ++++++++--------------
> > 1 file changed, 8 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/input/misc/pmic8xxx-pwrkey.c b/drivers/input/misc/pmic8xxx-pwrkey.c
> > index ce3c426..233b216 100644
> > --- a/drivers/input/misc/pmic8xxx-pwrkey.c
> > +++ b/drivers/input/misc/pmic8xxx-pwrkey.c
> > @@ -32,26 +32,21 @@
> > * @key_press_irq: key press irq number
> > */
> > struct pmic8xxx_pwrkey {
> > - struct input_dev *pwr;
>
> This causes compile errors as you need pwrkey->pwr in remove() to
> unregister input device. I'll fix it up.
>
Ah sorry. I forgot to send the patch before this that converts it
to devm.
> > err = devm_request_irq(&pdev->dev, key_press_irq, pwrkey_press_irq,
> > - IRQF_TRIGGER_RISING, "pmic8xxx_pwrkey_press", pwrkey);
> > + IRQF_TRIGGER_RISING, "pmic8xxx_pwrkey_press", pwr);
As you can see here because this driver isn't currently using
devm_request_irq().
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the linux-arm-kernel
mailing list