summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2020-02-03 08:02:45 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2020-02-27 17:39:03 -0300
commit8d563ecafecb42c7e4facb63b22fcc6992bb250f (patch)
tree93687673188ce82c5b90b9c092312b561398b8f6 /drivers/media/i2c/smiapp
parentab07b1a6ac6ee9fdd2cfcc58eaa80b7e4d135df1 (diff)
downloadlinux-8d563ecafecb42c7e4facb63b22fcc6992bb250f.tar.gz
linux-8d563ecafecb42c7e4facb63b22fcc6992bb250f.tar.bz2
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/smiapp')
-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,