Skip to content

Commit b9b5df2

Browse files
bvanasscheKAGA-KOKO
authored andcommitted
serial: cpm_uart: 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 d1a9a2f commit b9b5df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/cpm_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ static int cpm_uart_verify_port(struct uart_port *port,
631631

632632
if (ser->type != PORT_UNKNOWN && ser->type != PORT_CPM)
633633
ret = -EINVAL;
634-
if (ser->irq < 0 || ser->irq >= nr_irqs)
634+
if (ser->irq < 0 || ser->irq >= irq_get_nr_irqs())
635635
ret = -EINVAL;
636636
if (ser->baud_base < 9600)
637637
ret = -EINVAL;

0 commit comments

Comments
 (0)