Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@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

authored by

afzal mohammed and committed by
Daniel Lezcano
470cf1c2 cc2550b4

+2 -3
+2 -3
drivers/clocksource/timer-cs5535.c
··· 133 133 134 134 static int __init cs5535_mfgpt_init(void) 135 135 { 136 + unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER | IRQF_SHARED; 136 137 struct cs5535_mfgpt_timer *timer; 137 138 int ret; 138 139 uint16_t val; ··· 153 152 } 154 153 155 154 /* And register it with the kernel */ 156 - ret = request_irq(timer_irq, mfgpt_tick, 157 - IRQF_NOBALANCING | IRQF_TIMER | IRQF_SHARED, 158 - DRV_NAME, NULL); 155 + ret = request_irq(timer_irq, mfgpt_tick, flags, DRV_NAME, timer); 159 156 if (ret) { 160 157 printk(KERN_ERR DRV_NAME ": Unable to set up the interrupt.\n"); 161 158 goto err_irq;