linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: afzal mohammed <afzal.mohd.ma@gmail.com>
To: daniel.lezcano@linaro.org
Cc: kstewart@linuxfoundation.org, linus.walleij@linaro.org,
	shawnguo@kernel.org, festevam@gmail.com, afzal.mohd.ma@gmail.com,
	f.fainelli@gmail.com, khilman@baylibre.com, krzk@kernel.org,
	kgene@kernel.org, bcm-kernel-feedback-list@broadcom.com,
	linux-imx@nxp.com, u.kleine-koenig@pengutronix.de,
	rjui@broadcom.com, s.hauer@pengutronix.de,
	linux-samsung-soc@vger.kernel.org,
	linux-amlogic@lists.infradead.org, tglx@linutronix.de,
	allison@lohutok.net, linux-arm-kernel@lists.infradead.org,
	baohua@kernel.org, sbranden@broadcom.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux@prisktech.co.nz, kernel@pengutronix.de, info@metux.net,
	nsaenzjulienne@suse.de
Subject: [PATCH v4] clocksource/drivers/timer-cs5535: request irq with non-NULL dev_id
Date: Thu, 12 Mar 2020 12:18:17 +0530	[thread overview]
Message-ID: <20200312064817.19000-1-afzal.mohd.ma@gmail.com> (raw)
In-Reply-To: <e47ba222-bf4e-d13c-fbd3-6e7952097188@linaro.org>

Recently all usages of setup_irq() was replaced by request_irq().
request_irq() does a few sanity checks that were not done in
setup_irq(), if they fail irq registration will fail. One of the check
is to ensure that non-NULL dev_id is passed in the case of shared irq.

Fix it by passing non-NULL dev_id while registering the shared irq.

Fixes: cc2550b421aa ("clocksource: Replace setup_irq() by request_irq()")
Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
---

Hi Daniel,

i have assumed that you would not rebase your drivers/next tree & put the
SHA-id in Fixes tag.

Regards
afzal

 drivers/clocksource/timer-cs5535.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-cs5535.c b/drivers/clocksource/timer-cs5535.c
index 51ea0509fb25..d47acfe848ae 100644
--- a/drivers/clocksource/timer-cs5535.c
+++ b/drivers/clocksource/timer-cs5535.c
@@ -133,6 +133,7 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
 
 static int __init cs5535_mfgpt_init(void)
 {
+	unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER | IRQF_SHARED;
 	struct cs5535_mfgpt_timer *timer;
 	int ret;
 	uint16_t val;
@@ -152,9 +153,7 @@ static int __init cs5535_mfgpt_init(void)
 	}
 
 	/* And register it with the kernel */
-	ret = request_irq(timer_irq, mfgpt_tick,
-			  IRQF_NOBALANCING | IRQF_TIMER | IRQF_SHARED,
-			  DRV_NAME, NULL);
+	ret = request_irq(timer_irq, mfgpt_tick, flags, DRV_NAME, timer);
 	if (ret) {
 		printk(KERN_ERR DRV_NAME ": Unable to set up the interrupt.\n");
 		goto err_irq;
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-12  6:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24  0:47 [PATCH v2 00/18] genirq: Remove setup_irq() afzal mohammed
2020-02-24  0:49 ` [PATCH v2 02/18] ARM: replace setup_irq() by request_irq() afzal mohammed
2020-02-24 10:13   ` Lubomir Rintel
2020-02-26 16:31   ` Tony Lindgren
2020-02-24  0:50 ` [PATCH v2 08/18] MIPS: Replace " afzal mohammed
2020-02-24  0:52 ` [PATCH v2 16/18] clocksource: " afzal mohammed
2020-02-25  2:52   ` kbuild test robot
2020-02-25  7:51     ` afzal mohammed
2020-02-27 10:59     ` [PATCH v3 " afzal mohammed
2020-02-27 11:18       ` Daniel Lezcano
2020-03-12  6:48         ` afzal mohammed [this message]
2020-03-12  7:10           ` [PATCH v4] clocksource/drivers/timer-cs5535: request irq with non-NULL dev_id afzal mohammed
2020-03-12 18:23           ` Daniel Lezcano

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=20200312064817.19000-1-afzal.mohd.ma@gmail.com \
    --to=afzal.mohd.ma@gmail.com \
    --cc=allison@lohutok.net \
    --cc=baohua@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=info@metux.net \
    --cc=kernel@pengutronix.de \
    --cc=kgene@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzk@kernel.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=u.kleine-koenig@pengutronix.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;
as well as URLs for NNTP newsgroup(s).