summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2017-08-08 07:27:07 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 08:02:04 -0400
commit6c83c1d8e7058a22840b22f54f3b1acad2c2207c (patch)
tree582d9073f66784c6b58ea47a9340601600782700
parent787d8620912a42b32a72ef241b48466e63d3d266 (diff)
downloadop-kernel-dev-6c83c1d8e7058a22840b22f54f3b1acad2c2207c.zip
op-kernel-dev-6c83c1d8e7058a22840b22f54f3b1acad2c2207c.tar.gz
media: s5p-jpeg: fix number of components macro
The value to be processed must be first masked and then shifted, not the other way round. Fixes: 6c96dbbc2aa9f5b4a ("[media] s5p-jpeg: add support for 5433") Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-regs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-regs.h b/drivers/media/platform/s5p-jpeg/jpeg-regs.h
index 1870400..df790b1 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-regs.h
+++ b/drivers/media/platform/s5p-jpeg/jpeg-regs.h
@@ -371,7 +371,7 @@
#define EXYNOS4_NF_SHIFT 16
#define EXYNOS4_NF_MASK 0xff
#define EXYNOS4_NF(x) \
- (((x) << EXYNOS4_NF_SHIFT) & EXYNOS4_NF_MASK)
+ (((x) & EXYNOS4_NF_MASK) << EXYNOS4_NF_SHIFT)
/* JPEG quantizer table register */
#define EXYNOS4_QTBL_CONTENT(n) (0x100 + (n) * 0x40)
OpenPOWER on IntegriCloud