[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200312064817.19000-1-afzal.mohd.ma@gmail.com>
Date: Thu, 12 Mar 2020 12:18:17 +0530
From: afzal mohammed <afzal.mohd.ma@...il.com>
To: daniel.lezcano@...aro.org
Cc: afzal.mohd.ma@...il.com, allison@...utok.net, baohua@...nel.org,
bcm-kernel-feedback-list@...adcom.com, f.fainelli@...il.com,
festevam@...il.com, gregkh@...uxfoundation.org, info@...ux.net,
kernel@...gutronix.de, kgene@...nel.org, khilman@...libre.com,
krzk@...nel.org, kstewart@...uxfoundation.org,
linus.walleij@...aro.org, linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-imx@....com,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux@...sktech.co.nz, nsaenzjulienne@...e.de, rjui@...adcom.com,
s.hauer@...gutronix.de, sbranden@...adcom.com, shawnguo@...nel.org,
tglx@...utronix.de, u.kleine-koenig@...gutronix.de
Subject: [PATCH v4] clocksource/drivers/timer-cs5535: request irq with non-NULL dev_id
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@...il.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
Powered by blists - more mailing lists