aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorGravatar Colin Ian King <colin.i.king@gmail.com> 2022-03-07 23:42:47 +0100
committerGravatar Mauro Carvalho Chehab <mchehab@kernel.org> 2022-05-13 11:02:17 +0200
commit969be493f5065c78cb0fae8f9413a9f1a291aaae (patch)
treef9a6fc907fb08beadb70c69fcfde81a823857e0c /drivers/media/usb
parentmedia: MAINTAINERS: rectify entry for MEDIA DRIVERS FOR NVIDIA TEGRA - VDE (diff)
downloadlinux-969be493f5065c78cb0fae8f9413a9f1a291aaae.tar.gz
linux-969be493f5065c78cb0fae8f9413a9f1a291aaae.tar.bz2
linux-969be493f5065c78cb0fae8f9413a9f1a291aaae.zip
media: gspca: make the read-only array table static const
Don't populate the read-only array table on the stack but instead make 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>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/gspca/spca561.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/spca561.c b/drivers/media/usb/gspca/spca561.c
index d608a518c141..431527ed602b 100644
--- a/drivers/media/usb/gspca/spca561.c
+++ b/drivers/media/usb/gspca/spca561.c
@@ -510,7 +510,7 @@ static void setexposure(struct gspca_dev *gspca_dev, s32 val)
/* We choose to use the high bits setting the fixed framerate divisor
asap, as setting high basic exposure setting without the fixed
divider in combination with high gains makes the cam stop */
- int table[] = { 0, 450, 550, 625, EXPOSURE_MAX };
+ static const int table[] = { 0, 450, 550, 625, EXPOSURE_MAX };
for (i = 0; i < ARRAY_SIZE(table) - 1; i++) {
if (val <= table[i + 1]) {