Commit 969be493 authored by Colin Ian King's avatar Colin Ian King Committed by Mauro Carvalho Chehab

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: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent bebe10b9
...@@ -510,7 +510,7 @@ static void setexposure(struct gspca_dev *gspca_dev, s32 val) ...@@ -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 /* We choose to use the high bits setting the fixed framerate divisor
asap, as setting high basic exposure setting without the fixed asap, as setting high basic exposure setting without the fixed
divider in combination with high gains makes the cam stop */ 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++) { for (i = 0; i < ARRAY_SIZE(table) - 1; i++) {
if (val <= table[i + 1]) { if (val <= table[i + 1]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment