diff options
Diffstat (limited to 'drivers/media/video/v4l1-compat.c')
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index a861e150865e..efb67d29fc0b 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -127,7 +127,7 @@ set_v4l_control(struct inode *inode, | |||
127 | 127 | ||
128 | /* ----------------------------------------------------------------- */ | 128 | /* ----------------------------------------------------------------- */ |
129 | 129 | ||
130 | static int palette2pixelformat[] = { | 130 | const static unsigned int palette2pixelformat[] = { |
131 | [VIDEO_PALETTE_GREY] = V4L2_PIX_FMT_GREY, | 131 | [VIDEO_PALETTE_GREY] = V4L2_PIX_FMT_GREY, |
132 | [VIDEO_PALETTE_RGB555] = V4L2_PIX_FMT_RGB555, | 132 | [VIDEO_PALETTE_RGB555] = V4L2_PIX_FMT_RGB555, |
133 | [VIDEO_PALETTE_RGB565] = V4L2_PIX_FMT_RGB565, | 133 | [VIDEO_PALETTE_RGB565] = V4L2_PIX_FMT_RGB565, |
@@ -145,7 +145,7 @@ static int palette2pixelformat[] = { | |||
145 | [VIDEO_PALETTE_YUV422P] = V4L2_PIX_FMT_YUV422P, | 145 | [VIDEO_PALETTE_YUV422P] = V4L2_PIX_FMT_YUV422P, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | static unsigned int | 148 | static unsigned int __attribute_pure__ |
149 | palette_to_pixelformat(unsigned int palette) | 149 | palette_to_pixelformat(unsigned int palette) |
150 | { | 150 | { |
151 | if (palette < ARRAY_SIZE(palette2pixelformat)) | 151 | if (palette < ARRAY_SIZE(palette2pixelformat)) |
@@ -154,8 +154,8 @@ palette_to_pixelformat(unsigned int palette) | |||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||
157 | static unsigned int | 157 | static unsigned int __attribute_const__ |
158 | pixelformat_to_palette(int pixelformat) | 158 | pixelformat_to_palette(unsigned int pixelformat) |
159 | { | 159 | { |
160 | int palette = 0; | 160 | int palette = 0; |
161 | switch (pixelformat) | 161 | switch (pixelformat) |