From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754831AbbG0QBP (ORCPT ); Mon, 27 Jul 2015 12:01:15 -0400 Received: from terminus.zytor.com ([198.137.202.10]:36334 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753781AbbG0QBN (ORCPT ); Mon, 27 Jul 2015 12:01:13 -0400 Date: Mon, 27 Jul 2015 09:00:52 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: tglx@linutronix.de, hpa@zytor.com, Julia.Lawall@lip6.fr, jiang.liu@linux.intel.com, rmk+kernel@arm.linux.org.uk, mingo@kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Reply-To: hpa@zytor.com, Julia.Lawall@lip6.fr, tglx@linutronix.de, mingo@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, rmk+kernel@arm.linux.org.uk, jiang.liu@linux.intel.com In-Reply-To: <20150713151750.831790045@linutronix.de> References: <20150713151750.831790045@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Git-Commit-ID: aab1b9ef7542e30f65116fe098ee36c5e522f7d1 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: aab1b9ef7542e30f65116fe098ee36c5e522f7d1 Gitweb: http://git.kernel.org/tip/aab1b9ef7542e30f65116fe098ee36c5e522f7d1 Author: Thomas Gleixner AuthorDate: Mon, 13 Jul 2015 20:52:24 +0000 Committer: Thomas Gleixner CommitDate: Mon, 27 Jul 2015 13:36:39 +0200 spmi/pmic_arb: Consolidate chained IRQ handler install/remove 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: Greg Kroah-Hartman Cc: Jiang Liu Cc: Julia Lawall Link: http://lkml.kernel.org/r/20150713151750.831790045@linutronix.de Signed-off-by: Thomas Gleixner --- drivers/spmi/spmi-pmic-arb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index d7119db..db2aac1 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -928,8 +928,7 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) 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 platform_device *pdev) 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 platform_device *pdev) 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;