[PATCH v2] staging: gdm724x: make DEVICE_STRING array const
From: pdsj2807
Date: Thu Oct 15 2026 - 08:22:43 EST
From: Palak Raval <pdsj2807@xxxxxxxxx>
The DEVICE_STRING array contains pointers to string literals and is
never modified.
Declare it as 'const char * const' to improve const correctness and
prevent accidental modification.
Signed-off-by: Palak Raval <pdsj2807@xxxxxxxxx>
---
v2:
- Drop unrelated formatting changes
- Keep only the DEVICE_STRING const-correctness change
---
drivers/staging/gdm724x/gdm_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 32b2e817ff04..65c53811f099 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -31,7 +31,7 @@ static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
static DEFINE_MUTEX(gdm_table_lock);
static const char *DRIVER_STRING[TTY_MAX_COUNT] = {"GCTATC", "GCTDM"};
-static char *DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
+static const char * const DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
static void gdm_port_destruct(struct tty_port *port)
{
--
2.34.1