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>
This commit is contained in:
Sakari Ailus 2020-02-03 08:02:45 -03:00 committed by Mauro Carvalho Chehab
parent ab07b1a6ac
commit 8d563ecafe
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ static int __smiapp_read(struct smiapp_sensor *sensor, u32 reg, u32 *val,
&& len != SMIAPP_REG_32BIT) && len != SMIAPP_REG_32BIT)
return -EINVAL; return -EINVAL;
if (len == SMIAPP_REG_8BIT || !only8) if (!only8)
rval = ____smiapp_read(sensor, SMIAPP_REG_ADDR(reg), len, val); rval = ____smiapp_read(sensor, SMIAPP_REG_ADDR(reg), len, val);
else else
rval = ____smiapp_read_8only(sensor, SMIAPP_REG_ADDR(reg), len, rval = ____smiapp_read_8only(sensor, SMIAPP_REG_ADDR(reg), len,