Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] mxl5007t: fix reg read

Register to read should be written to register 0xfb and then
perform I2C read to get reg value.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Antti Palosaari and committed by
Mauro Carvalho Chehab
576b849e d7d89dc8

+2 -1
+2 -1
drivers/media/common/tuners/mxl5007t.c
··· 488 488 489 489 static int mxl5007t_read_reg(struct mxl5007t_state *state, u8 reg, u8 *val) 490 490 { 491 + u8 buf[2] = { 0xfb, reg }; 491 492 struct i2c_msg msg[] = { 492 493 { .addr = state->i2c_props.addr, .flags = 0, 493 - .buf = &reg, .len = 1 }, 494 + .buf = buf, .len = 2 }, 494 495 { .addr = state->i2c_props.addr, .flags = I2C_M_RD, 495 496 .buf = val, .len = 1 }, 496 497 };