Skip to content

Commit 4846c4c

Browse files
bvanasscheKAGA-KOKO
authored andcommitted
serial: 8250: 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 5732a63 commit 4846c4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/8250/8250_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,7 @@ static void serial8250_config_port(struct uart_port *port, int flags)
31763176
static int
31773177
serial8250_verify_port(struct uart_port *port, struct serial_struct *ser)
31783178
{
3179-
if (ser->irq >= nr_irqs || ser->irq < 0 ||
3179+
if (ser->irq >= irq_get_nr_irqs() || ser->irq < 0 ||
31803180
ser->baud_base < 9600 || ser->type < PORT_UNKNOWN ||
31813181
ser->type >= ARRAY_SIZE(uart_config) || ser->type == PORT_CIRRUS ||
31823182
ser->type == PORT_STARTECH)

0 commit comments

Comments
 (0)