Skip to content

Commit 470cf1c

Browse files
afzalmamdlezcano
authored andcommitted
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: cc2550b ("clocksource: Replace setup_irq() by request_irq()") Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200312064817.19000-1-afzal.mohd.ma@gmail.com
1 parent cc2550b commit 470cf1c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/clocksource/timer-cs5535.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
133133

134134
static int __init cs5535_mfgpt_init(void)
135135
{
136+
unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER | IRQF_SHARED;
136137
struct cs5535_mfgpt_timer *timer;
137138
int ret;
138139
uint16_t val;
@@ -152,9 +153,7 @@ static int __init cs5535_mfgpt_init(void)
152153
}
153154

154155
/* And register it with the kernel */
155-
ret = request_irq(timer_irq, mfgpt_tick,
156-
IRQF_NOBALANCING | IRQF_TIMER | IRQF_SHARED,
157-
DRV_NAME, NULL);
156+
ret = request_irq(timer_irq, mfgpt_tick, flags, DRV_NAME, timer);
158157
if (ret) {
159158
printk(KERN_ERR DRV_NAME ": Unable to set up the interrupt.\n");
160159
goto err_irq;

0 commit comments

Comments
 (0)