[PATCH v2 4/4] i2c: muxes: pca954x: constify pca954x_irq_chip
From: Pradhan, Sanman
Date: Thu Sep 03 2026 - 19:47:18 EST
From: Sanman Pradhan <psanman@xxxxxxxxxxx>
pca954x_irq_chip is never modified at runtime, and
irq_set_chip_and_handler() takes a const struct irq_chip *. Mark the
instance const so it can live in read-only memory.
Signed-off-by: Sanman Pradhan <psanman@xxxxxxxxxxx>
---
drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index b52e0464b40ee..d91007cf1f235 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -427,7 +427,7 @@ static int pca954x_irq_set_type(struct irq_data *idata, unsigned int type)
return 0;
}
-static struct irq_chip pca954x_irq_chip = {
+static const struct irq_chip pca954x_irq_chip = {
.name = "i2c-mux-pca954x",
.irq_set_type = pca954x_irq_set_type,
};
--
2.34.1