public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: Julia.Lawall@lip6.fr, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	hpa@zytor.com, jiang.liu@linux.intel.com,
	rmk+kernel@arm.linux.org.uk, mingo@kernel.org
Subject: [tip:irq/core] spmi/pmic_arb: Consolidate chained IRQ handler install/remove
Date: Wed, 29 Jul 2015 01:17:53 -0700	[thread overview]
Message-ID: <tip-fb68ba6d0b06cf287e9081d60f705501c52124f6@git.kernel.org> (raw)
In-Reply-To: <20150713151750.831790045@linutronix.de>

Commit-ID:  fb68ba6d0b06cf287e9081d60f705501c52124f6
Gitweb:     http://git.kernel.org/tip/fb68ba6d0b06cf287e9081d60f705501c52124f6
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:52:24 +0000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 29 Jul 2015 10:08:10 +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 <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150713151750.831790045@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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;

  parent reply	other threads:[~2015-07-29  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 20:52 [patch 0/2] spmi: Interrupt cleanups and API change preparation Thomas Gleixner
2015-07-13 20:52 ` [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Thomas Gleixner
2015-07-27 16:00   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-29  8:17   ` tip-bot for Thomas Gleixner [this message]
2015-07-13 20:52 ` [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
2015-07-27 16:01   ` [tip:irq/core] " tip-bot for Jiang Liu
2015-07-29  8:18   ` tip-bot for Jiang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-fb68ba6d0b06cf287e9081d60f705501c52124f6@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox