Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250528194439.567263-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Krzysztof Kozlowski and committed by
Sebastian Reichel
188014b4 6af8ffab

+3 -3
+3 -3
drivers/power/supply/bq256xx_charger.c
··· 387 387 } 388 388 } 389 389 390 - static struct reg_default bq2560x_reg_defs[] = { 390 + static const struct reg_default bq2560x_reg_defs[] = { 391 391 {BQ256XX_INPUT_CURRENT_LIMIT, 0x17}, 392 392 {BQ256XX_CHARGER_CONTROL_0, 0x1a}, 393 393 {BQ256XX_CHARGE_CURRENT_LIMIT, 0xa2}, ··· 398 398 {BQ256XX_CHARGER_CONTROL_3, 0x4c}, 399 399 }; 400 400 401 - static struct reg_default bq25611d_reg_defs[] = { 401 + static const struct reg_default bq25611d_reg_defs[] = { 402 402 {BQ256XX_INPUT_CURRENT_LIMIT, 0x17}, 403 403 {BQ256XX_CHARGER_CONTROL_0, 0x1a}, 404 404 {BQ256XX_CHARGE_CURRENT_LIMIT, 0x91}, ··· 411 411 {BQ256XX_CHARGER_CONTROL_4, 0x75}, 412 412 }; 413 413 414 - static struct reg_default bq25618_619_reg_defs[] = { 414 + static const struct reg_default bq25618_619_reg_defs[] = { 415 415 {BQ256XX_INPUT_CURRENT_LIMIT, 0x17}, 416 416 {BQ256XX_CHARGER_CONTROL_0, 0x1a}, 417 417 {BQ256XX_CHARGE_CURRENT_LIMIT, 0x91},