Skip to content

Commit 5732a63

Browse files
bvanasscheKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 03f039d commit 5732a63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/serial_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
919919
if (uport->ops->verify_port)
920920
retval = uport->ops->verify_port(uport, new_info);
921921

922-
if ((new_info->irq >= nr_irqs) || (new_info->irq < 0) ||
922+
if ((new_info->irq >= irq_get_nr_irqs()) || (new_info->irq < 0) ||
923923
(new_info->baud_base < 9600))
924924
retval = -EINVAL;
925925

0 commit comments

Comments
 (0)