From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754679AbbGMUwg (ORCPT ); Mon, 13 Jul 2015 16:52:36 -0400 Received: from www.linutronix.de ([62.245.132.108]:56421 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754626AbbGMUwb (ORCPT ); Mon, 13 Jul 2015 16:52:31 -0400 Message-Id: <20150713151750.831790045@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 13 Jul 2015 20:52:24 -0000 From: Thomas Gleixner To: LKML Cc: Greg Kroah-Hartman , Jiang Liu , Russell King , Julia Lawall Subject: [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove References: <20150713151726.611901153@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=spmi-pmic_arb-Consolidate-chained-IRQ-handler-instal.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 Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King Signed-off-by: Thomas Gleixner Cc: Julia Lawall Cc: Greg Kroah-Hartman --- drivers/spmi/spmi-pmic-arb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) Index: tip/drivers/spmi/spmi-pmic-arb.c =================================================================== --- tip.orig/drivers/spmi/spmi-pmic-arb.c +++ tip/drivers/spmi/spmi-pmic-arb.c @@ -928,8 +928,7 @@ static int spmi_pmic_arb_probe(struct pl goto err_put_ctrl; } - irq_set_handler_data(pa->irq, pa); - irq_set_chained_handler(pa->irq, pmic_arb_chained_irq); + irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa); err = spmi_controller_add(ctrl); if (err) @@ -938,8 +937,7 @@ static int spmi_pmic_arb_probe(struct pl return 0; err_domain_remove: - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); err_put_ctrl: spmi_controller_put(ctrl); @@ -951,8 +949,7 @@ static int spmi_pmic_arb_remove(struct p struct spmi_controller *ctrl = platform_get_drvdata(pdev); struct spmi_pmic_arb_dev *pa = spmi_controller_get_drvdata(ctrl); spmi_controller_remove(ctrl); - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); spmi_controller_put(ctrl); return 0;