From mboxrd@z Thu Jan 1 00:00:00 1970 From: chris@cnpbagwell.com Subject: [PATCH v2 2/4] input: wacom - move Bamboo Touch irq to own function Date: Sat, 11 Sep 2010 13:30:36 -0500 Message-ID: <1284229838-2852-3-git-send-email-chris@cnpbagwell.com> References: <1284229838-2852-1-git-send-email-chris@cnpbagwell.com> Return-path: Received: from mail-gy0-f174.google.com ([209.85.160.174]:58566 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627Ab0IKSaz (ORCPT ); Sat, 11 Sep 2010 14:30:55 -0400 Received: by gyd8 with SMTP id 8so1649354gyd.19 for ; Sat, 11 Sep 2010 11:30:55 -0700 (PDT) In-Reply-To: <1284229838-2852-1-git-send-email-chris@cnpbagwell.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, pingc@wacom.com Cc: Chris Bagwell From: Chris Bagwell This is in preparation of pen support in same irq handler. Chris Signed-off-by: Chris Bagwell --- drivers/input/tablet/wacom_wac.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 2f4411a..2f7ed9a 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -855,7 +855,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) return retval; } -static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len) +static int wacom_bpt_touch(struct wacom_wac *wacom) { struct wacom_features *features = &wacom->features; struct input_dev *input = wacom->input; @@ -863,9 +863,6 @@ static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len) int sp = 0, sx = 0, sy = 0, count = 0; int i; - if (len != WACOM_PKGLEN_BBTOUCH) - return 0; - for (i = 0; i < 2; i++) { int p = data[9 * i + 2]; input_mt_slot(input, i); @@ -907,6 +904,14 @@ static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len) return 0; } +static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len) +{ + if (len == WACOM_PKGLEN_BBTOUCH) + return wacom_bpt_touch(wacom); + + return 0; +} + void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) { bool sync; -- 1.7.2.2