From patchwork Sat Jul 8 22:44:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 785861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3x4mlF2jHWz9s7F for ; Sun, 9 Jul 2017 08:45:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="zEunbfMg"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbdGHWoZ (ORCPT ); Sat, 8 Jul 2017 18:44:25 -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 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v68MiFGB003553; Sat, 8 Jul 2017 17:44:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1499553855; bh=pNLw/1lHDdPKFVQzXGLtzALenCEMCtp4QQRWxyORefQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=zEunbfMgjEYGH3yDklrl+a5FRRBQXhlx0c9rZmOe5x5y8t1BIoXtOtTZhsTxWVf+3 S6RGdIEfH3GAcLnuY4KVN4pcUV6c3UucNM2+1eEaY/PyndkQn7Q3UBRqtpLqrdknVi h9/LM8YGrLRgIwF2xH8jjnbU7hNHpICkh3Ba1lc8= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v68MiFAb023620; Sat, 8 Jul 2017 17:44:15 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Sat, 8 Jul 2017 17:44:14 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v68MiEBb016561; Sat, 8 Jul 2017 17:44:14 -0500 Received: from localhost (uda0226610.dhcp.ti.com [128.247.59.147]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v68MiE316127; Sat, 8 Jul 2017 17:44:14 -0500 (CDT) 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 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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)); } }