* [PATCH] media: media/radio: make array probe_ports static const
@ 2022-01-09 21:00 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2022-01-09 21:00 UTC (permalink / raw)
To: Mauro Carvalho Chehab, linux-media; +Cc: kernel-janitors, linux-kernel
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.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/media/radio/radio-sf16fmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c
index 54a40d60e4fd..1fb88c2b916c 100644
--- a/drivers/media/radio/radio-sf16fmi.c
+++ b/drivers/media/radio/radio-sf16fmi.c
@@ -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++) {
--
2.32.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-09 21:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 21:00 [PATCH] media: media/radio: make array probe_ports static const Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome