[PATCH] input: sirfsoc-onkey - report onkey untouch event by detecting pin status

Barry Song 21cnbao at gmail.com
Thu Feb 13 01:48:09 EST 2014


2014-02-13 11:41 GMT+08:00 Dmitry Torokhov <dmitry.torokhov at gmail.com>:
> On February 12, 2014 6:32:03 PM PST, Barry Song <21cnbao at gmail.com> wrote:
>>2014-02-13 7:11 GMT+08:00 Dmitry Torokhov <dmitry.torokhov at gmail.com>:
>>> Hi Barry,
>>>
>>> On Mon, Feb 10, 2014 at 06:07:39PM +0800, Barry Song wrote:
>>>>
>>>>  static int sirfsoc_pwrc_remove(struct platform_device *pdev)
>>>>  {
>>>> +     struct sirfsoc_pwrc_drvdata *pwrcdrv =
>>dev_get_drvdata(&pdev->dev);
>>>> +
>>>>       device_init_wakeup(&pdev->dev, 0);
>>>>
>>>> +     cancel_delayed_work_sync(&pwrcdrv->work);
>>>> +
>>>
>>> This is racy: interrupt is freed later and can schedule work again.
>>
>>thanks, Dmitry. i will do a manual devm_free_irq() before cancelling
>>the work and before devres removes the resources.
>
> Another option would be to use devm custom action to ensure that work is canceled after freeing IRQ.

yes. you did a great job to have a devm_add_action() API.

>
>
> --
> Dmitry

-barry



More information about the linux-arm-kernel mailing list