From patchwork Fri Oct 2 13:50:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 7316501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 44CDFBEEA4 for ; Fri, 2 Oct 2015 13:53:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 776F1208E3 for ; Fri, 2 Oct 2015 13:53:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9653520835 for ; Fri, 2 Oct 2015 13:53:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zi0ja-0004OS-2x; Fri, 02 Oct 2015 13:50:50 +0000 Received: from eusmtp01.atmel.com ([212.144.249.242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zi0jX-0004KN-4x for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2015 13:50:47 +0000 Received: from tenerife.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Fri, 2 Oct 2015 15:50:19 +0200 From: Nicolas Ferre To: Ludovic Desroches , , Subject: [PATCH 1/2] pinctrl: at91-pio4: Use irq_set_handler_locked() Date: Fri, 2 Oct 2015 15:50:45 +0200 Message-ID: X-Mailer: git-send-email 2.1.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151002_065047_402825_A64414C0 X-CRM114-Status: UNSURE ( 7.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, s.hauer@pengutronix.de, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, Nicolas Ferre Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use irq_set_handler_locked() as it avoids a redundant lookup of the irq descriptor. This adaptation landed on the pinctrl-at91.c driver while this one was being developped: synchronize with this enhancement and avoid the following compilation error: ../drivers/pinctrl/pinctrl-at91-pio4.c: In function 'atmel_gpio_irq_set_type': ../drivers/pinctrl/pinctrl-at91-pio4.c:173:3: error: implicit declaration of function '__irq_set_handler_locked' [-Werror=implicit-function-declaration] __irq_set_handler_locked(d->irq, handle_edge_irq); ^ Signed-off-by: Nicolas Ferre --- drivers/pinctrl/pinctrl-at91-pio4.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index 5e2189f17fe1..1f1a64ef3559 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -170,23 +170,23 @@ static int atmel_gpio_irq_set_type(struct irq_data *d, unsigned type) switch (type) { case IRQ_TYPE_EDGE_RISING: - __irq_set_handler_locked(d->irq, handle_edge_irq); + irq_set_handler_locked(d, handle_edge_irq); reg |= ATMEL_PIO_CFGR_EVTSEL_RISING; break; case IRQ_TYPE_EDGE_FALLING: - __irq_set_handler_locked(d->irq, handle_edge_irq); + irq_set_handler_locked(d, handle_edge_irq); reg |= ATMEL_PIO_CFGR_EVTSEL_FALLING; break; case IRQ_TYPE_EDGE_BOTH: - __irq_set_handler_locked(d->irq, handle_edge_irq); + irq_set_handler_locked(d, handle_edge_irq); reg |= ATMEL_PIO_CFGR_EVTSEL_BOTH; break; case IRQ_TYPE_LEVEL_LOW: - __irq_set_handler_locked(d->irq, handle_level_irq); + irq_set_handler_locked(d, handle_level_irq); reg |= ATMEL_PIO_CFGR_EVTSEL_LOW; break; case IRQ_TYPE_LEVEL_HIGH: - __irq_set_handler_locked(d->irq, handle_level_irq); + irq_set_handler_locked(d, handle_level_irq); reg |= ATMEL_PIO_CFGR_EVTSEL_HIGH; break; case IRQ_TYPE_NONE: