]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hpet: Switch to irq_get_nr_irqs()
authorBart Van Assche <bvanassche@acm.org>
Tue, 15 Oct 2024 19:09:38 +0000 (12:09 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Oct 2024 19:56:57 +0000 (21:56 +0200)
Use the irq_get_nr_irqs() function instead of the global variable
'nr_irqs'. Prepare for changing 'nr_irqs' from an exported global
variable into a variable with file scope.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241015190953.1266194-8-bvanassche@acm.org
drivers/char/hpet.c

index e904e476e49ad8e45f6cac1bef24a2be48188f95..48fe96ab4649010263725aff5aef14a7a0403009 100644 (file)
@@ -162,6 +162,7 @@ static irqreturn_t hpet_interrupt(int irq, void *data)
 
 static void hpet_timer_set_irq(struct hpet_dev *devp)
 {
+       const unsigned int nr_irqs = irq_get_nr_irqs();
        unsigned long v;
        int irq, gsi;
        struct hpet_timer __iomem *timer;