From patchwork Wed Aug 8 12:54:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10581 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 80C7B23E00 for ; Wed, 8 Aug 2012 12:55:04 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2FC4AA18141 for ; Wed, 8 Aug 2012 12:55:04 +0000 (UTC) Received: by yenq6 with SMTP id q6so709714yen.11 for ; Wed, 08 Aug 2012 05:55:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=z0Km8g9UyKeWp4eMtwYFfuZ/c4eA+5kzV/LT7MhBZV4=; b=QSHb4euEVQxAZJ9fujtEvKG6idmbQMXIhbxFB9fZ2gyQgLY4/0SMPIR8eMwNXyxjnX lYv44LR0Ya99zf73vgQZt9+2lmlY3KlcfRbB7KXYIFbomLJ1nNivzcFAa2A08ddtwxwS G3b+TaBNzrojpDWXkRsA0TgpKrwaIVhVJeq1XL9+9XMneBDIZvDWMdJIJU3cIHwbs0CQ OqmtW1RETnhP2987m9oCDFyStHjSvUEHZnhgkp534L7ALh9uY32ZpXtYcINZrklfgJK9 TQ1OgYeOFNiAypFz7jKVpxD5juleZQXni/BrgJppOQJ3dh93QE/ZKW8S6Vwdj1jQlxj9 7jFw== Received: by 10.42.189.73 with SMTP id dd9mr233600icb.49.1344430503118; Wed, 08 Aug 2012 05:55:03 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp605832igc; Wed, 8 Aug 2012 05:55:01 -0700 (PDT) Received: by 10.216.232.204 with SMTP id n54mr10075428weq.182.1344430501145; Wed, 08 Aug 2012 05:55:01 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.186]) by mx.google.com with ESMTP id p10si6266632wic.16.2012.08.08.05.55.00; Wed, 08 Aug 2012 05:55:01 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.186 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.186; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.186 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LjwS5-1TauRp0KTp-00cQcf; Wed, 08 Aug 2012 14:55:00 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , stable@vger.kernel.org (v3.2+), Daniel Mack , Haojian Zhuang Subject: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver Date: Wed, 8 Aug 2012 14:54:49 +0200 Message-Id: <1344430493-5304-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344430493-5304-1-git-send-email-arnd@arndb.de> References: <1344430493-5304-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:5KZEO/Fy4nyj/eXxN5uFiNt+o96OxZGOP1OlONedrWu aH/GP57xsSzrtC/BWI2tGH34doPdOYreszWY/TcGCwIxaPFihh 2SdYbURu1ZyLieDoK8T/aA3Z2/XeAjgWlkXh/HyJi1SzJ1d9gI 4YIUObE8ZqKMGxn2oJTacR4i0yxpd7NHJYkMyZtPiBc/WDf8ht 17KfWwnkpgBqcl1rCF0BIcZAV6lVWaH24aznK2cE6fnEJKl+75 y1yAjSKqeNG8CyJEKTmYgP5bt6D7nJIZ4JBK8vv3qH6jkZ0yh2 Ol2+XvMkoJvVyecGVJ8ZoSUm05J3g4ukarPfxnsDazL6SWICCL Zdfm36MD7VW5JFnY+4Uv22xkx3qX+glTI+8NOhidQ97Nmuwaxa Js4PeNkkVZFeg== X-Gm-Message-State: ALoCoQlC73f3ZkbMFBU25F9kElvSUaHPvOD5ET30jyz6st3GdQVTCSIPV6CCDqgoRuE64k+2YtRY The irq_to_gpio function was removed from the pxa platform in linux-3.2, and this driver has been broken since. Without this patch, building raumfeld_defconfig results in: drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active': drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration] Signed-off-by: Arnd Bergmann Cc: stable@vger.kernel.org (v3.2+) Cc: Daniel Mack Cc: Haojian Zhuang --- arch/arm/mach-pxa/raumfeld.c | 1 + drivers/input/touchscreen/eeti_ts.c | 8 +++++--- include/linux/input/eeti_ts.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 5905ed1..9e1c4ea 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -953,6 +953,7 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = { static struct eeti_ts_platform_data eeti_ts_pdata = { .irq_active_high = 1, + .gpio = GPIO_TOUCH_IRQ, }; static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 503c709..45dab18 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c @@ -48,7 +48,7 @@ struct eeti_ts_priv { struct input_dev *input; struct work_struct work; struct mutex mutex; - int irq, irq_active_high; + int irq, gpio, irq_active_high; }; #define EETI_TS_BITDEPTH (11) @@ -62,7 +62,7 @@ struct eeti_ts_priv { static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv) { - return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high; + return gpio_get_value(priv->gpio) == priv->irq_active_high; } static void eeti_ts_read(struct work_struct *work) @@ -203,8 +203,10 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, pdata = client->dev.platform_data; - if (pdata) + if (pdata) { + priv->gpio = pdata->gpio; priv->irq_active_high = pdata->irq_active_high; + } irq_flags = priv->irq_active_high ? IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING; diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h index f875b31..3404504 100644 --- a/include/linux/input/eeti_ts.h +++ b/include/linux/input/eeti_ts.h @@ -3,6 +3,7 @@ struct eeti_ts_platform_data { unsigned int irq_active_high; + unsigned int gpio; }; #endif /* LINUX_INPUT_EETI_TS_H */