From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juha =?iso-8859-1?B?WXJq9mzk?= Subject: Re: Suspending with keypad bug (RFC) Date: Sun, 13 Aug 2006 12:36:41 +0300 Message-ID: <20060813093641.GA20466@mail.solidboot.com> References: <44D6423F.3070001@solidboot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: balrogg@gmail.com Cc: Linux-OMAP List-Id: linux-omap@vger.kernel.org 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); Cheers, Juha