Skip to contentSkip to conversation

staging: media: atomisp: make pmic_name array const

PATCH New Raushan Kumar 1 participant 1 message Aug 12

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media: atomisp: make pmic_name array const

pmic_name is a fixed lookup table that is only ever read, never reassigned. Mark it as an array of const pointers so the compiler enforces this and the array can be placed in read-only memory, as flagged by checkpatch.pl.

---
 drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +1 -1
index a1d3a16921ea..d628fe4dca6d 100644
@@ -109,7 +109,7 @@ static enum {
 	PMIC_CRYSTALCOVE
 } pmic_id;
 
-static const char *pmic_name[] = {
+static const char * const pmic_name[] = {
 	[PMIC_UNSET]		= "ACPI device PM",
 	[PMIC_REGULATOR]	= "regulator driver",
 	[PMIC_AXP]		= "XPower AXP288 PMIC",
Signature · 1 line
2.55.0