The patch number 14396 was added via Douglas Schilling Landgraf
<[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: Hans Verkuil <[email protected]>
tvp7002: fix compilation breakage when advanced debug is enabled
> On Mon, 22 Feb 2010 08:21:44 -0800 Randy Dunlap wrote:
> drivers/media/video/tvp7002.c:896: error: 'struct tvp7002' has no member
> named 'registers'
>
> so where are these registers??
Hmm, that code is a remnant from older revisions of this driver. Unfortunately,
when I compiled this driver before creating my pull request I forgot to turn on
the CONFIG_VIDEO_ADV_DEBUG option and so I never saw it.
Also fixed the g_register function: it never returned a register
value in the original code.
Priority: normal
Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
linux/drivers/media/video/tvp7002.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff -r 599590792ee0 -r dea52d21c348 linux/drivers/media/video/tvp7002.c
--- a/linux/drivers/media/video/tvp7002.c Sat Mar 06 20:40:38 2010 -0300
+++ b/linux/drivers/media/video/tvp7002.c Sat Mar 06 20:44:57 2010 -0300
@@ -859,13 +859,17 @@
struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
+ u8 val;
+ int ret;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- return reg->val < 0 ? -EINVAL : 0;
+ ret = tvp7002_read(sd, reg->reg & 0xff, &val);
+ reg->val = val;
+ return ret;
}
/*
@@ -881,21 +885,13 @@
struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
- struct tvp7002 *device = to_tvp7002(sd);
- int wres;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- wres = tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
-
- /* Update the register value in device's table */
- if (!wres)
- device->registers[reg->reg].value = reg->val;
-
- return wres < 0 ? -EINVAL : 0;
+ return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
}
#endif
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/dea52d21c3484cdb5bd2031d636bc5c91656a73b
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits