Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: media: atomisp: make pmic_name array const
@ 2026-08-12  8:03 Raushan Kumar
  0 siblings, 0 replies; only message in thread
From: Raushan Kumar @ 2026-08-12  8:03 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
	linux-media, linux-staging, Raushan Kumar

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.

Signed-off-by: Raushan Kumar <mitramaurya80@gmail.com>
---
 drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
index a1d3a16921ea..d628fe4dca6d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
@@ -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",
-- 
2.55.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-12  8:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12  8:03 [PATCH] staging: media: atomisp: make pmic_name array const Raushan Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox