From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932945AbcBPPmB (ORCPT ); Tue, 16 Feb 2016 10:42:01 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:59051 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932606AbcBPPl4 (ORCPT ); Tue, 16 Feb 2016 10:41:56 -0500 From: Arnd Bergmann To: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Russell King , Bjorn Helgaas , Alexandre Courbot , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Ralf Baechle , linux-mips@linux-mips.org, "# v4 . 3+" , Alban Bedel , Thomas Gleixner , Paul Burton Subject: [PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call Date: Tue, 16 Feb 2016 16:40:34 +0100 Message-Id: <1455637261-2920972-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <455637086-2794174-1-git-send-email-arnd@arndb.de> References: <455637086-2794174-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:gSycZQZpcMneao4j+bplvES8VGXkXohQ0lbdhcmpTyYYyDQBE8k PT4qa7Pr0V/v53emodKthu5X77UOG4Zi9bVu/XQoswEXyRnCdmMf8RLRvV68ASER2jwW6Jp +wzsYF8s4p534evQ0NVwIrNNF1WwgSgfnigrGV97g5dC1tHh181jtqx0iDo7iOGYDbpT8Ty Nj27BZtLQQvSAoGSaZt0A== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZRt5ZyZSNH0=:IWlXwxYCG1u0IDjdJNiFfv sIE83fZ6GzlNUdxQA5+Luyc2UbjdiyAVmPLbmmAc0Y/N/aAZ51rpR6dQOMzf9lBvLSCQG4KiA /6fFjc6QTziD6H5VpPQdxYcT3byJcrqnKzhSgINUpYZCooYPw9knZ+KGErl6HvzgmYBvFAbp1 BL0SwxJZ8QKUh9HYFKQUGXSAKxMY6svd5GtFiIdPaHMJfyNDCFUnHMAkXGyNiXxWGW38f1C+h TQSpq2FI9ADzHAyKPx1+T0LE8uDXqALr/JZy2DUnFs/wlPTzyydFMzu58gWGk8qpOiB8N1T0a dDyA75sJsLUEiQ2a0Otg9LAeNrCLlE4wCijcMfYQX/eAMzZ6l3VmcBYmOgEvBNtgpMnBoa6Og IuiCGjVekBl34kbMekN8+1cagiYJsGYNcz5BXarcM8gXgUcPhWdYkRIB7OkxOC9dgbas6JIM5 sUoxf0Q8Vhh7pHcQLJonMNt9Qh6hraOm0MhKUKPb+irxkGm8YhIp6HqO9HHWJFz1YCnaAXwkx b6o82krNX0KpF82IXkRLnymtU+jBaTUoJrQDs0iqPSssh+kNmWjrMwZfNVTkWw81mCvccFjzr TDqRwKpqKuhG0Pk8D7fHOx+zhJrZSdUHE5vF2F+hum9TYTsPii672PxxaxAZPzz5Lv3QZJRMy Kc5EUucMzwodz5IObAJTHuVQ/yCyh6U6uvP6eFzKP3CyoDEfwB/UDR3YnYVMxbG/owGQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gpiolib has removed the irq_to_gpio() API several years ago, but the global header still provided a non-working stub. With a MIPS-wide change to use the generic header file, the jz4740 platform is now using the wrong stub implementation of irq_to_gpio(), which cannot work. This uses an open-coded implementation in the only line it is used in. Suggested-by: Lars-Peter Clausen Signed-off-by: Arnd Bergmann Cc: # v4.3+ Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h"). --- arch/mips/jz4740/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c index 8c6d76c9b2d6..d9907e57e9b9 100644 --- a/arch/mips/jz4740/gpio.c +++ b/arch/mips/jz4740/gpio.c @@ -270,7 +270,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask) } EXPORT_SYMBOL(jz_gpio_port_get_value); -#define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f) +#define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f) static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq) { -- 2.7.0