summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2020-02-03 12:02:45 +0100
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2020-02-27 21:39:03 +0100
commit8d563ecafecb42c7e4facb63b22fcc6992bb250f (patch)
tree93687673188ce82c5b90b9c092312b561398b8f6 /drivers/media/i2c
parentmedia: omap3isp: Prevent enabling CCDC when stopping streaming (diff)
downloadlinux-8d563ecafecb42c7e4facb63b22fcc6992bb250f.tar.xz
linux-8d563ecafecb42c7e4facb63b22fcc6992bb250f.zip
media: smiapp: Simplify condition for choosing 8-bit access
Use the only8 boolean to determine whether 8-bit access is required for reading. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-regs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-regs.c b/drivers/media/i2c/smiapp/smiapp-regs.c
index ce8c1d47fbf0..cc93a7dbf8a6 100644
--- a/drivers/media/i2c/smiapp/smiapp-regs.c
+++ b/drivers/media/i2c/smiapp/smiapp-regs.c
@@ -158,7 +158,7 @@ static int __smiapp_read(struct smiapp_sensor *sensor, u32 reg, u32 *val,
&& len != SMIAPP_REG_32BIT)
return -EINVAL;
- if (len == SMIAPP_REG_8BIT || !only8)
+ if (!only8)
rval = ____smiapp_read(sensor, SMIAPP_REG_ADDR(reg), len, val);
else
rval = ____smiapp_read_8only(sensor, SMIAPP_REG_ADDR(reg), len,