lib: sbi_irqchip: Use chip as variable name for irqchip device

The irqchip device represents an interrupt controller so use chip
as variable name instead of dev. This will avoid confusion as the
sbi_irqchip framework grows.

Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260213055342.3124872-2-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Anup Patel
2026-02-13 11:23:35 +05:30
committed by Anup Patel
parent 6d5b2b9b05
commit 51837c731b
2 changed files with 10 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ struct sbi_irqchip_device {
struct sbi_dlist node;
/** Initialize per-hart state for the current hart */
int (*warm_init)(struct sbi_irqchip_device *dev);
int (*warm_init)(struct sbi_irqchip_device *chip);
/** Handle an IRQ from this irqchip */
int (*irq_handle)(void);
@@ -38,7 +38,7 @@ struct sbi_irqchip_device {
int sbi_irqchip_process(void);
/** Register an irqchip device to receive callbacks */
void sbi_irqchip_add_device(struct sbi_irqchip_device *dev);
void sbi_irqchip_add_device(struct sbi_irqchip_device *chip);
/** Initialize interrupt controllers */
int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot);

View File

@@ -25,19 +25,19 @@ int sbi_irqchip_process(void)
return ext_irqfn();
}
void sbi_irqchip_add_device(struct sbi_irqchip_device *dev)
void sbi_irqchip_add_device(struct sbi_irqchip_device *chip)
{
sbi_list_add_tail(&dev->node, &irqchip_list);
sbi_list_add_tail(&chip->node, &irqchip_list);
if (dev->irq_handle)
ext_irqfn = dev->irq_handle;
if (chip->irq_handle)
ext_irqfn = chip->irq_handle;
}
int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot)
{
int rc;
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
struct sbi_irqchip_device *dev;
struct sbi_irqchip_device *chip;
if (cold_boot) {
rc = sbi_platform_irqchip_init(plat);
@@ -45,10 +45,10 @@ int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot)
return rc;
}
sbi_list_for_each_entry(dev, &irqchip_list, node) {
if (!dev->warm_init)
sbi_list_for_each_entry(chip, &irqchip_list, node) {
if (!chip->warm_init)
continue;
rc = dev->warm_init(dev);
rc = chip->warm_init(chip);
if (rc)
return rc;
}