Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Colin Ian King and committed by
Mauro Carvalho Chehab
2bea8388 19bc4f40

+1 -1
+1 -1
drivers/media/radio/radio-sf16fmi.c
··· 275 275 struct v4l2_device *v4l2_dev = &fmi->v4l2_dev; 276 276 struct v4l2_ctrl_handler *hdl = &fmi->hdl; 277 277 int res, i; 278 - int probe_ports[] = { 0, 0x284, 0x384 }; 278 + static const int probe_ports[] = { 0, 0x284, 0x384 }; 279 279 280 280 if (io < 0) { 281 281 for (i = 0; i < ARRAY_SIZE(probe_ports); i++) {