Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: amba-pl011: 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 <bvanassche@acm.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241015190953.1266194-16-bvanassche@acm.org

authored by

Bart Van Assche and committed by
Thomas Gleixner
d1a9a2f4 3905fb87

+1 -1
+1 -1
drivers/tty/serial/amba-pl011.c
··· 2202 2202 2203 2203 if (ser->type != PORT_UNKNOWN && ser->type != PORT_AMBA) 2204 2204 ret = -EINVAL; 2205 - if (ser->irq < 0 || ser->irq >= nr_irqs) 2205 + if (ser->irq < 0 || ser->irq >= irq_get_nr_irqs()) 2206 2206 ret = -EINVAL; 2207 2207 if (ser->baud_base < 9600) 2208 2208 ret = -EINVAL;