Skip to content

Commit 7cf8821

Browse files
krzksre
authored andcommitted
power: supply: bq25980_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 188014b commit 7cf8821

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/power/supply/bq25980_charger.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct bq25980_device {
104104
int watchdog_timer;
105105
};
106106

107-
static struct reg_default bq25980_reg_defs[] = {
107+
static const struct reg_default bq25980_reg_defs[] = {
108108
{BQ25980_BATOVP, 0x5A},
109109
{BQ25980_BATOVP_ALM, 0x46},
110110
{BQ25980_BATOCP, 0x51},
@@ -159,7 +159,7 @@ static struct reg_default bq25980_reg_defs[] = {
159159
{BQ25980_CHRGR_CTRL_6, 0x0},
160160
};
161161

162-
static struct reg_default bq25975_reg_defs[] = {
162+
static const struct reg_default bq25975_reg_defs[] = {
163163
{BQ25980_BATOVP, 0x5A},
164164
{BQ25980_BATOVP_ALM, 0x46},
165165
{BQ25980_BATOCP, 0x51},
@@ -214,7 +214,7 @@ static struct reg_default bq25975_reg_defs[] = {
214214
{BQ25980_CHRGR_CTRL_6, 0x0},
215215
};
216216

217-
static struct reg_default bq25960_reg_defs[] = {
217+
static const struct reg_default bq25960_reg_defs[] = {
218218
{BQ25980_BATOVP, 0x5A},
219219
{BQ25980_BATOVP_ALM, 0x46},
220220
{BQ25980_BATOCP, 0x51},

0 commit comments

Comments
 (0)