Re: Suspending with keypad bug (RFC)

andrzej zaborowski
2006-08-17T19:43:14Z

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

On 13/08/06, Juha Yrjölä <juha.yrjola@solidboot.com> wrote:
> Hi,
>
> On Thu, Aug 10, 2006 at 06:55:26AM +0200, andrzej zaborowski wrote:
>
> > Thanks for help! I'm attaching the corrected version, it works nicely.
>
> + unsigned long flags;
> + spin_lock_irqsave(&omap_kp->suspend_lock, flags);
> +
> + if (omap_kp->suspended)
> + return IRQ_HANDLED;
> +
> + spin_unlock_irqrestore(&omap_kp->suspend_lock, flags);
>
> Here you are returning with the lock held and IRQs disabled. It should be
> like this:
>
> spin_lock_irqsave(&omap_kp->suspend_lock, flags);
> if (omap_kp->suspended) {
> spin_unlock_irqrestore(&omap_kp->suspend_lock, flags);
> return IRQ_HANDLED;
> }
> spin_unlock_irqrestore(&omap_kp->suspend_lock, flags);

Oops, I must be blind! I'm going to send a corrected version. Thanks again.

>
> Cheers,
> Juha
>

Regards,
Andrzej
--
balrog 2oo6

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]