[PATCH 07/21] hpet: Switch to number_of_interrupts()

From: Bart Van Assche
Date: Mon Sep 30 2024 - 14:17:52 EST


Use the number_of_interrupts() function instead of the global variable
'nr_irqs'. This patch prepares for changing 'nr_irqs' from an exported
global variable into a variable with file scope.

Cc: Clemens Ladisch <clemens@xxxxxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
drivers/char/hpet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index e904e476e49a..e618ae66587d 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -195,7 +195,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp)
v &= ~0xffff;

for_each_set_bit(irq, &v, HPET_MAX_IRQ) {
- if (irq >= nr_irqs) {
+ if (irq >= number_of_interrupts()) {
irq = HPET_MAX_IRQ;
break;
}