summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2023-06-27 15:17:07 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-07-20 00:12:36 +0300
commit7b9fc309c0b57c5b1230bf3e0a8bb9e937eb6529 (patch)
tree410f042b5135f8942391010df8623c7c292a8ee9 /drivers/power
parentda28e18d6a31448a5f67e59e835669e930f8c044 (diff)
downloadlinux-7b9fc309c0b57c5b1230bf3e0a8bb9e937eb6529.tar.xz
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 <colin.i.king@gmail.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bd99954-charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/bd99954-charger.c b/drivers/power/supply/bd99954-charger.c
index 086dcf4033c1..1ed1d9f99fb3 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,
};