Skip to contentSkip to conversation

media: mxl5005s: Make array RegAddr static const

PATCH New Colin Ian King 1 participant 1 message Oct 5, 2022

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

PATCH 1/1 media: mxl5005s: Make array RegAddr static const

Don't populate the read-only array RegAddr on the stack but instead make it static const. Also makes the object code a little smaller.

---
 drivers/media/tuners/mxl5005s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/tuners/mxl5005s.c +1 -1
index ab4c43df9d18..cd9f225ca26c 100644
@@ -3637,7 +3637,7 @@ static u16 MXL_GetCHRegister_ZeroIF(struct dvb_frontend *fe, u8 *RegNum,
 	u16 status = 0;
 	int i;
 
-	u8 RegAddr[] = {43, 136};
+	static const u8 RegAddr[] = {43, 136};
 
 	*count = ARRAY_SIZE(RegAddr);
 
Signature · 1 line
2.37.3