From: Colin Ian King Date: Tue, 27 Jun 2023 12:17:07 +0000 (+0100) Subject: power: supply: bd99954: make read-only array sub_status_reg X-Git-Tag: v6.6-rc1~171^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b9fc309c0b57c5b1230bf3e0a8bb9e937eb6529;p=thirdparty%2Flinux.git power: supply: bd99954: make read-only array sub_status_reg Don't populate the read-only array on the stack, instead make it static const. Signed-off-by: Colin Ian King Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/bd99954-charger.c b/drivers/power/supply/bd99954-charger.c index 086dcf4033c17..1ed1d9f99fb3e 100644 --- a/drivers/power/supply/bd99954-charger.c +++ b/drivers/power/supply/bd99954-charger.c @@ -536,7 +536,7 @@ static irqreturn_t bd9995x_irq_handler_thread(int irq, void *private) for_each_set_bit(i, &tmp, 7) { int sub_status, sub_mask; - int sub_status_reg[] = { + static const int sub_status_reg[] = { INT1_STATUS, INT2_STATUS, INT3_STATUS, INT4_STATUS, INT5_STATUS, INT6_STATUS, INT7_STATUS, };