]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
serial: core: Switch to irq_get_nr_irqs()
authorBart Van Assche <bvanassche@acm.org>
Tue, 15 Oct 2024 19:09:43 +0000 (12:09 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Oct 2024 19:56:58 +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-13-bvanassche@acm.org
drivers/tty/serial/serial_core.c

index d94d73e45fb6ded18ed45e0b1077fd4170168907..74fa02b237729931928b2ae4902c699ec017af94 100644 (file)
@@ -919,7 +919,7 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
        if (uport->ops->verify_port)
                retval = uport->ops->verify_port(uport, new_info);
 
-       if ((new_info->irq >= nr_irqs) || (new_info->irq < 0) ||
+       if ((new_info->irq >= irq_get_nr_irqs()) || (new_info->irq < 0) ||
            (new_info->baud_base < 9600))
                retval = -EINVAL;