diff mbox

[media] tc358743: fix register i2c_rd/wr function fix

Message ID 20170504152017.3696-1-p.zabel@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Philipp Zabel May 4, 2017, 3:20 p.m. UTC
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: Arnd Bergmann <arnd@arndb.de>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/i2c/tc358743.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arnd Bergmann May 4, 2017, 3:24 p.m. UTC | #1
On Thu, May 4, 2017 at 5:20 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> 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: Arnd Bergmann <arnd@arndb.de>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---

Cc: stable@vger.kernel.org # v4.11
Acked-by: Arnd Bergmann <arnd@arndb.de>

Sorry about the typo
Philipp Zabel May 4, 2017, 3:36 p.m. UTC | #2
Hi Arnd,

On Thu, 2017-05-04 at 17:24 +0200, Arnd Bergmann wrote:
> On Thu, May 4, 2017 at 5:20 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > 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: Arnd Bergmann <arnd@arndb.de>
> > Cc: Hans Verkuil <hans.verkuil@cisco.com>
> > Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > ---
> 
> Cc: stable@vger.kernel.org # v4.11
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> Sorry about the typo

Thanks, the original fix currently is only in the media-tree master
branch. I don't see any indication that it is queued for
stable/linux-4.11.y though. Should it be?

regards
Philipp
Arnd Bergmann May 4, 2017, 3:58 p.m. UTC | #3
On Thu, May 4, 2017 at 5:36 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Hi Arnd,
>
> On Thu, 2017-05-04 at 17:24 +0200, Arnd Bergmann wrote:
>> On Thu, May 4, 2017 at 5:20 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
>> > 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: Arnd Bergmann <arnd@arndb.de>
>> > Cc: Hans Verkuil <hans.verkuil@cisco.com>
>> > Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
>> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
>> > ---
>>
>> Cc: stable@vger.kernel.org # v4.11
>>
>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>>
>> Sorry about the typo
>
> Thanks, the original fix currently is only in the media-tree master
> branch. I don't see any indication that it is queued for
> stable/linux-4.11.y though. Should it be?

Sorry, my mistake (again). I looked it up wrong.

      Arnd
diff mbox

Patch

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index acef4eca269f1..3251cba89e8f6 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)
 static void i2c_wr8_and_or(struct v4l2_subdev *sd, u16 reg,
 		u8 mask, u8 val)
 {
-	i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2);
+	i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1);
 }
 
 static u16 i2c_rd16(struct v4l2_subdev *sd, u16 reg)