[media] smiapp: Fix determining the need for 8-bit read access
commitb05cd219ec200c1c91d59011f8692d9b1c166fbc
authorSakari Ailus <sakari.ailus@linux.intel.com>
Sat, 12 Apr 2014 19:41:12 +0000 (12 16:41 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 23 Apr 2014 14:10:27 +0000 (23 11:10 -0300)
treeb6ee7fecaf6c723ba4fa7c2e0983234d9c299470
parent6fcc7a528d5e23940af5acdfb1bae09088d7b662
[media] smiapp: Fix determining the need for 8-bit read access

8-bit reads are needed in some cases; however the condition used was wrong.
Regular access (register width) was used if:

len == SMIAPP_REG_8BIT && !only8

This causes 8-bit read access to be used always. The operator should be ||
instead: regular access can be used for 8-bit reads OR if allowed otherwise.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/smiapp/smiapp-regs.c