From 786dc07be9e50039482de73bc48484ad9604e246 Mon Sep 17 00:00:00 2001 From: Moses Christopher Bollavarapu Date: Tue, 19 Apr 2022 22:20:51 +0200 Subject: media: i2c: video-i2c: Use GENMASK for masking bits Replace 0x0380 with GENMASK(9, 7) to obtain 0b0000_0011_1000_0000 Signed-off-by: Moses Christopher Bollavarapu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/video-i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/media/i2c/video-i2c.c') diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index 1d5f48329cb2..e08e3579c0a1 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -9,6 +9,7 @@ * - Melexis MLX90640 Thermal Cameras */ +#include #include #include #include @@ -62,7 +63,7 @@ /* Control register */ #define MLX90640_REG_CTL1 0x800d -#define MLX90640_REG_CTL1_MASK 0x0380 +#define MLX90640_REG_CTL1_MASK GENMASK(9, 7) #define MLX90640_REG_CTL1_MASK_SHIFT 7 struct video_i2c_chip; -- cgit v1.2.3