Commit 786dc07b authored by Moses Christopher Bollavarapu's avatar Moses Christopher Bollavarapu Committed by Mauro Carvalho Chehab

media: i2c: video-i2c: Use GENMASK for masking bits

Replace 0x0380 with GENMASK(9, 7) to obtain 0b0000_0011_1000_0000
Signed-off-by: default avatarMoses Christopher Bollavarapu <mosescb.dev@gmail.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f0de79f6
......@@ -9,6 +9,7 @@
* - Melexis MLX90640 Thermal Cameras
*/
#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <linux/hwmon.h>
......@@ -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;
......
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