From patchwork Tue Apr 13 18:31:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 92236 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3DIVvdn021010 for ; Tue, 13 Apr 2010 18:31:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538Ab0DMSbz (ORCPT ); Tue, 13 Apr 2010 14:31:55 -0400 Received: from buzzloop.caiaq.de ([212.112.241.133]:55062 "EHLO buzzloop.caiaq.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492Ab0DMSbz (ORCPT ); Tue, 13 Apr 2010 14:31:55 -0400 Received: from localhost (localhost [127.0.0.1]) by buzzloop.caiaq.de (Postfix) with ESMTP id B51AC4E8077; Tue, 13 Apr 2010 20:31:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at buzzloop.caiaq.de Received: from buzzloop.caiaq.de ([127.0.0.1]) by localhost (buzzloop.caiaq.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oLx1zneFcsm4; Tue, 13 Apr 2010 20:31:51 +0200 (CEST) Received: from localhost.localdomain (pd95699b2.dip0.t-ipconnect.de [217.86.153.178]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by buzzloop.caiaq.de (Postfix) with ESMTPSA id CF0387E000B; Tue, 13 Apr 2010 20:31:50 +0200 (CEST) From: Daniel Mack To: linux-input@vger.kernel.org Cc: Daniel Mack , Dmitry Torokhov Subject: [PATCH] input: eeti_ts: cancel pending work when going to suspend Date: Tue, 13 Apr 2010 20:31:45 +0200 Message-Id: <1271183505-28133-1-git-send-email-daniel@caiaq.de> X-Mailer: git-send-email 1.7.0.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 13 Apr 2010 18:31:57 +0000 (UTC) diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 204b8a1..2a01695 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c @@ -250,6 +250,9 @@ static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) if (device_may_wakeup(&client->dev)) enable_irq_wake(priv->irq); + disable_irq(priv->irq); + cancel_work_sync(&priv->work); + return 0; } @@ -260,6 +263,10 @@ static int eeti_ts_resume(struct i2c_client *client) if (device_may_wakeup(&client->dev)) disable_irq_wake(priv->irq); + /* If we have active users, read the events once to arm the IRQ */ + if (priv->input->users) + eeti_ts_read(&priv->work); + return 0; } #else