diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2017-05-04 11:20:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-06 06:09:23 -0400 |
commit | 4b0755e90ae03ba40174842af6fa810355960fbc (patch) | |
tree | 647c1a41832382e9a24d274ab542af97b06099e9 | |
parent | 963761a0b2e85663ee4a5630f72930885a06598a (diff) |
[media] tc358743: fix register i2c_rd/wr function fix
The below mentioned fix contains a small but severe bug,
fix it to make the driver work again.
Fixes: 3538aa6ecfb2 ("[media] tc358743: fix register i2c_rd/wr functions")
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/i2c/tc358743.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index acef4eca269f..3251cba89e8f 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c | |||
@@ -223,7 +223,7 @@ static void i2c_wr8(struct v4l2_subdev *sd, u16 reg, u8 val) | |||
223 | static void i2c_wr8_and_or(struct v4l2_subdev *sd, u16 reg, | 223 | static void i2c_wr8_and_or(struct v4l2_subdev *sd, u16 reg, |
224 | u8 mask, u8 val) | 224 | u8 mask, u8 val) |
225 | { | 225 | { |
226 | i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2); | 226 | i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1); |
227 | } | 227 | } |
228 | 228 | ||
229 | static u16 i2c_rd16(struct v4l2_subdev *sd, u16 reg) | 229 | static u16 i2c_rd16(struct v4l2_subdev *sd, u16 reg) |