diff options
author | Shaik Ameer Basha <shaik.ameer@samsung.com> | 2013-02-21 05:54:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 17:22:43 -0400 |
commit | 6a5360966ac44905ecb840dd6c9d736072145df2 (patch) | |
tree | ce4b0706a4671abdc9300d6d2e34bc583c29f2f9 /drivers | |
parent | 4cec1893d8fe01ef6adc89a135a804acd2989a48 (diff) |
[media] fimc-lite: Fix the variable type to avoid possible crash
Changing the variable type to 'int' from 'unsigned int'. Driver
logic expects the variable type to be 'int'.
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-lite-reg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite-reg.c b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c index f0af0754a7b4..ac9663ce2a49 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite-reg.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c | |||
@@ -128,10 +128,10 @@ static const u32 src_pixfmt_map[8][3] = { | |||
128 | void flite_hw_set_source_format(struct fimc_lite *dev, struct flite_frame *f) | 128 | void flite_hw_set_source_format(struct fimc_lite *dev, struct flite_frame *f) |
129 | { | 129 | { |
130 | enum v4l2_mbus_pixelcode pixelcode = dev->fmt->mbus_code; | 130 | enum v4l2_mbus_pixelcode pixelcode = dev->fmt->mbus_code; |
131 | unsigned int i = ARRAY_SIZE(src_pixfmt_map); | 131 | int i = ARRAY_SIZE(src_pixfmt_map); |
132 | u32 cfg; | 132 | u32 cfg; |
133 | 133 | ||
134 | while (i-- >= 0) { | 134 | while (--i >= 0) { |
135 | if (src_pixfmt_map[i][0] == pixelcode) | 135 | if (src_pixfmt_map[i][0] == pixelcode) |
136 | break; | 136 | break; |
137 | } | 137 | } |
@@ -224,9 +224,9 @@ static void flite_hw_set_out_order(struct fimc_lite *dev, struct flite_frame *f) | |||
224 | { V4L2_MBUS_FMT_VYUY8_2X8, FLITE_REG_CIODMAFMT_CRYCBY }, | 224 | { V4L2_MBUS_FMT_VYUY8_2X8, FLITE_REG_CIODMAFMT_CRYCBY }, |
225 | }; | 225 | }; |
226 | u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); | 226 | u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); |
227 | unsigned int i = ARRAY_SIZE(pixcode); | 227 | int i = ARRAY_SIZE(pixcode); |
228 | 228 | ||
229 | while (i-- >= 0) | 229 | while (--i >= 0) |
230 | if (pixcode[i][0] == dev->fmt->mbus_code) | 230 | if (pixcode[i][0] == dev->fmt->mbus_code) |
231 | break; | 231 | break; |
232 | cfg &= ~FLITE_REG_CIODMAFMT_YCBCR_ORDER_MASK; | 232 | cfg &= ~FLITE_REG_CIODMAFMT_YCBCR_ORDER_MASK; |