From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754390AbbGMVAn (ORCPT ); Mon, 13 Jul 2015 17:00:43 -0400 Received: from www.linutronix.de ([62.245.132.108]:55781 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbbGMUlj (ORCPT ); Mon, 13 Jul 2015 16:41:39 -0400 Message-Id: <20150712232405.557336725@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 13 Jul 2015 20:41:30 -0000 From: Thomas Gleixner To: LKML Cc: Linus Walleij , Alexandre Courbot , linux-gpio@vger.kernel.org, Jiang Liu , Julia Lawall Subject: [patch 10/19] gpio/pch: Use irq_set_handler_locked() References: <20150712232317.244138485@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=gpio-pch-Use-irq_set_handler_locked.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use irq_set_handler_locked() as it avoids a redundant lookup of the irq descriptor. Search and replacement was done with coccinelle: Signed-off-by: Thomas Gleixner Cc: Jiang Liu Cc: Julia Lawall Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org --- drivers/gpio/gpio-pch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: tip/drivers/gpio/gpio-pch.c =================================================================== --- tip.orig/drivers/gpio/gpio-pch.c +++ tip/drivers/gpio/gpio-pch.c @@ -281,9 +281,9 @@ static int pch_irq_type(struct irq_data /* And the handler */ if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) - __irq_set_handler_locked(d->irq, handle_level_irq); + irq_set_handler_locked(d, handle_level_irq); else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) - __irq_set_handler_locked(d->irq, handle_edge_irq); + irq_set_handler_locked(d, handle_edge_irq); unlock: spin_unlock_irqrestore(&chip->spinlock, flags);