]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: 3com: 3c59x: Switch to irq_get_nr_irqs()
authorBart Van Assche <bvanassche@acm.org>
Tue, 15 Oct 2024 19:09:39 +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-9-bvanassche@acm.org
drivers/net/ethernet/3com/3c59x.c

index 082388bb6169fa206514f71f5fae075668537544..790270912913fbecb34919f1c7c4ea139893c850 100644 (file)
@@ -1302,7 +1302,7 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,
        if (print_info)
                pr_cont(", IRQ %d\n", dev->irq);
        /* Tell them about an invalid IRQ. */
-       if (dev->irq <= 0 || dev->irq >= nr_irqs)
+       if (dev->irq <= 0 || dev->irq >= irq_get_nr_irqs())
                pr_warn(" *** Warning: IRQ %d is unlikely to work! ***\n",
                        dev->irq);