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

irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm

Get rid of the separate flag to indicate if the IRLM bit is present in
the INTC/Interrupt Control Register 0, by considering -1 an invalid
irlm_bit value.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201028153955.1736767-1-geert+renesas@glider.be

authored by

Geert Uytterhoeven and committed by
Marc Zyngier
b388bdf2 f9ac7bbd

+3 -5
+3 -5
drivers/irqchip/irq-renesas-intc-irqpin.c
··· 71 71 }; 72 72 73 73 struct intc_irqpin_config { 74 - unsigned int irlm_bit; 75 - unsigned needs_irlm:1; 74 + int irlm_bit; /* -1 if non-existent */ 76 75 }; 77 76 78 77 static unsigned long intc_irqpin_read32(void __iomem *iomem) ··· 348 349 349 350 static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x = { 350 351 .irlm_bit = 23, /* ICR0.IRLM0 */ 351 - .needs_irlm = 1, 352 352 }; 353 353 354 354 static const struct intc_irqpin_config intc_irqpin_rmobile = { 355 - .needs_irlm = 0, 355 + .irlm_bit = -1, 356 356 }; 357 357 358 358 static const struct of_device_id intc_irqpin_dt_ids[] = { ··· 468 470 } 469 471 470 472 /* configure "individual IRQ mode" where needed */ 471 - if (config && config->needs_irlm) { 473 + if (config && config->irlm_bit >= 0) { 472 474 if (io[INTC_IRQPIN_REG_IRLM]) 473 475 intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM, 474 476 config->irlm_bit, 1, 1);