Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752182AbdGHWo1 (ORCPT ); Sat, 8 Jul 2017 18:44:27 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:31312 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853AbdGHWoV (ORCPT ); Sat, 8 Jul 2017 18:44:21 -0400 From: Grygorii Strashko To: Robert Jarzmik , Linus Walleij , Thierry Reding , Jonathan Hunter , CC: , , Jerome Brunet , Grygorii Strashko Subject: [RFC/RFT PATCH 1/3] gpio: tegra: remove gpio_to_irq() from hw irq handlers Date: Sat, 8 Jul 2017 17:44:11 -0500 Message-ID: <20170708224413.18281-2-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170708224413.18281-1-grygorii.strashko@ti.com> References: <20170708224413.18281-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 729 Lines: 25 gpio_to_irq() API expected to be used by GPIO consumers and not drivers and there are no guarantee that its gpiolib implementation is irq safe. Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-tegra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 88529d3..31b9a86 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -389,7 +389,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc) chained_irq_exit(chip, desc); } - generic_handle_irq(gpio_to_irq(gpio + pin)); + generic_handle_irq(irq_find_mapping(tgi->irq_domain, + gpio + pin)); } } -- 2.10.1