Skip to content

Commit 188014b

Browse files
krzksre
authored andcommitted
power: supply: bq256xx_charger: Constify reg_default array
Static 'struct reg_default' array is not modified so can be changed to const for more safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 6af8ffa commit 188014b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/power/supply/bq256xx_charger.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static void bq256xx_usb_work(struct work_struct *data)
387387
}
388388
}
389389

390-
static struct reg_default bq2560x_reg_defs[] = {
390+
static const struct reg_default bq2560x_reg_defs[] = {
391391
{BQ256XX_INPUT_CURRENT_LIMIT, 0x17},
392392
{BQ256XX_CHARGER_CONTROL_0, 0x1a},
393393
{BQ256XX_CHARGE_CURRENT_LIMIT, 0xa2},
@@ -398,7 +398,7 @@ static struct reg_default bq2560x_reg_defs[] = {
398398
{BQ256XX_CHARGER_CONTROL_3, 0x4c},
399399
};
400400

401-
static struct reg_default bq25611d_reg_defs[] = {
401+
static const struct reg_default bq25611d_reg_defs[] = {
402402
{BQ256XX_INPUT_CURRENT_LIMIT, 0x17},
403403
{BQ256XX_CHARGER_CONTROL_0, 0x1a},
404404
{BQ256XX_CHARGE_CURRENT_LIMIT, 0x91},
@@ -411,7 +411,7 @@ static struct reg_default bq25611d_reg_defs[] = {
411411
{BQ256XX_CHARGER_CONTROL_4, 0x75},
412412
};
413413

414-
static struct reg_default bq25618_619_reg_defs[] = {
414+
static const struct reg_default bq25618_619_reg_defs[] = {
415415
{BQ256XX_INPUT_CURRENT_LIMIT, 0x17},
416416
{BQ256XX_CHARGER_CONTROL_0, 0x1a},
417417
{BQ256XX_CHARGE_CURRENT_LIMIT, 0x91},

0 commit comments

Comments
 (0)