From: Bart Van Assche Date: Tue, 15 Oct 2024 19:09:43 +0000 (-0700) Subject: serial: core: Switch to irq_get_nr_irqs() X-Git-Tag: v6.13-rc1~173^2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5732a63bada9923b4edcf90860fb8697d7c1231b;p=thirdparty%2Fkernel%2Flinux.git serial: core: Switch to irq_get_nr_irqs() 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 Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241015190953.1266194-13-bvanassche@acm.org --- diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index d94d73e45fb6d..74fa02b237729 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -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;