diff options
author | Bart Van Assche <bvanassche@acm.org> | 2024-10-15 12:09:51 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-10-16 21:56:59 +0200 |
commit | f4dd946c775e85e4f9aa460cd3dba197c35e43f1 (patch) | |
tree | 75af4a76dcc6663fc5a955ad8905f4711bdc44ca /fs/proc/interrupts.c | |
parent | 3e48fa2ecf4de8baf8a368987f8ea8ffb64ac7af (diff) |
fs/procfs: 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-21-bvanassche@acm.org
Diffstat (limited to 'fs/proc/interrupts.c')
-rw-r--r-- | fs/proc/interrupts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c index cb0edc7cbf09..714a22ded8a8 100644 --- a/fs/proc/interrupts.c +++ b/fs/proc/interrupts.c @@ -11,13 +11,13 @@ */ static void *int_seq_start(struct seq_file *f, loff_t *pos) { - return (*pos <= nr_irqs) ? pos : NULL; + return *pos <= irq_get_nr_irqs() ? pos : NULL; } static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) { (*pos)++; - if (*pos > nr_irqs) + if (*pos > irq_get_nr_irqs()) return NULL; return pos; } |