Skip to contentSkip to conversation

media: media/radio: make array probe_ports static const

PATCH New Colin Ian King 1 participant 1 message Jan 9, 2022

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

PATCH 1/1 media: media/radio: make array probe_ports static const

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

---
 drivers/media/radio/radio-sf16fmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/radio/radio-sf16fmi.c +1 -1
index 54a40d60e4fd..1fb88c2b916c 100644
@@ -275,7 +275,7 @@ static int __init fmi_init(void)
 	struct v4l2_device *v4l2_dev = &fmi->v4l2_dev;
 	struct v4l2_ctrl_handler *hdl = &fmi->hdl;
 	int res, i;
-	int probe_ports[] = { 0, 0x284, 0x384 };
+	static const int probe_ports[] = { 0, 0x284, 0x384 };
 
 	if (io < 0) {
 		for (i = 0; i < ARRAY_SIZE(probe_ports); i++) {
Signature · 1 line
2.32.0