mfd: wm8994-regmap: Constify reg_default tables
Subsystems (2)
PATCH 1/1 mfd: wm8994-regmap: Constify reg_default tables
These reg_default tables are not modified after initialized, so make them const.
Signed-off-by Axel Lin <[email protected]>
--- drivers/mfd/wm8994-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/wm8994-regmap.c +3 -3
@@ -19,7 +19,7 @@#include "wm8994.h" -static struct reg_default wm1811_defaults[] = { +static const struct reg_default wm1811_defaults[] = { {0x0001 ,0x0000 },/* R1 - Power Management (1) */ {0x0002 ,0x6000 },/* R2 - Power Management (2) */ {0x0003 ,0x0000 },/* R3 - Power Management (3) */
@@ -251,7 +251,7 @@ static struct reg_default wm1811_defaults[] = { { 0x0748, 0x003F }, /* R1864 - IRQ Debounce */ }; -static struct reg_default wm8994_defaults[] = { +static const struct reg_default wm8994_defaults[] = { {0x0001 ,0x0000 },/* R1 - Power Management (1) */ {0x0002 ,0x6000 },/* R2 - Power Management (2) */ { 0x0003, 0x0000 }, /* R3 - Power Management (3) */
@@ -470,7 +470,7 @@ static struct reg_default wm8994_defaults[] = { { 0x0748, 0x003F }, /* R1864 - IRQ Debounce */ }; -static struct reg_default wm8958_defaults[] = { +static const struct reg_default wm8958_defaults[] = { {0x0001 ,0x0000 },/* R1 - Power Management (1) */ {0x0002 ,0x6000 },/* R2 - Power Management (2) */ { 0x0003, 0x0000 }, /* R3 - Power Management (3) */
Signature · 1 line
2.1.0
Quoted 5 lines · Axel Lin
These
reg_defaulttables are not modified after initialized, so make them const.Signed-off-by Axel Lin <[email protected]>---
Acked-by Charles Keepax <[email protected]>
Thanks,
Charles
Lee Jones
AppliedQuoted 7 lines · Axel Lin
These
reg_defaulttables are not modified after initialized, so make them const.Signed-off-by Axel Lin <[email protected]>--- drivers/mfd/wm8994-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
Quoted 31 lines
drivers/mfd/wm8994-regmap.c +3
-3@@ -19,7 +19,7 @@#include "wm8994.h" -static struct reg_default wm1811_defaults[] = { +static const struct reg_default wm1811_defaults[] = { {0x0001 ,0x0000 },/* R1 - Power Management (1) */ {0x0002 ,0x6000 },/* R2 - Power Management (2) */ {0x0003 ,0x0000 },/* R3 - Power Management (3) */ @@ -251,7 +251,7 @@ static struct reg_default wm1811_defaults[] = { { 0x0748, 0x003F }, /* R1864 - IRQ Debounce */ }; -static struct reg_default wm8994_defaults[] = { +static const struct reg_default wm8994_defaults[] = { {0x0001 ,0x0000 },/* R1 - Power Management (1) */ {0x0002 ,0x6000 },/* R2 - Power Management (2) */ { 0x0003, 0x0000 }, /* R3 - Power Management (3) */@@ -470,7 +470,7 @@ static struct reg_default wm8994_defaults[] = { { 0x0748, 0x003F }, /* R1864 - IRQ Debounce */ }; -static struct reg_default wm8958_defaults[] = { +static const struct reg_default wm8958_defaults[] = { {0x0001 ,0x0000 },/* R1 - Power Management (1) */ {0x0002 ,0x6000 },/* R2 - Power Management (2) */ { 0x0003, 0x0000 }, /* R3 - Power Management (3) */
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog