* Re: linux-next: Tree for February 22 (media/video/tvp7002)
[not found] <20100222172218.4fd82a45.sfr@canb.auug.org.au>
@ 2010-02-22 16:21 ` Randy Dunlap
2010-02-25 16:52 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2010-02-22 16:21 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, LKML, Linux Media Mailing List,
Santiago Nunez-Corrales
On 02/21/10 22:22, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20100219:
drivers/media/video/tvp7002.c:896: error: 'struct tvp7002' has no member named 'registers'
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for February 22 (media/video/tvp7002)
2010-02-22 16:21 ` linux-next: Tree for February 22 (media/video/tvp7002) Randy Dunlap
@ 2010-02-25 16:52 ` Randy Dunlap
2010-02-25 20:34 ` Hans Verkuil
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2010-02-25 16:52 UTC (permalink / raw)
To: linux-next
Cc: Stephen Rothwell, LKML, Linux Media Mailing List,
Santiago Nunez-Corrales
On Mon, 22 Feb 2010 08:21:44 -0800 Randy Dunlap wrote:
> On 02/21/10 22:22, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20100219:
>
>
> drivers/media/video/tvp7002.c:896: error: 'struct tvp7002' has no member named 'registers'
same problem in linux-next-20100225.
so where are these registers??
thanks,
---
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for February 22 (media/video/tvp7002)
2010-02-25 16:52 ` Randy Dunlap
@ 2010-02-25 20:34 ` Hans Verkuil
2010-02-25 20:57 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2010-02-25 20:34 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-next, Stephen Rothwell, LKML, Linux Media Mailing List,
Santiago Nunez-Corrales
On Thursday 25 February 2010 17:52:05 Randy Dunlap wrote:
> On Mon, 22 Feb 2010 08:21:44 -0800 Randy Dunlap wrote:
>
> > On 02/21/10 22:22, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > Changes since 20100219:
> >
> >
> > drivers/media/video/tvp7002.c:896: error: 'struct tvp7002' has no member named 'registers'
>
> same problem in linux-next-20100225.
>
> 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.
Anyway, below is a patch that fixes this. Please apply.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Santiago, I've also fixed the g_register function: it never returned a register
value in the original code.
Regards,
Hans
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
index 0f0270b..5a878bc 100644
--- a/drivers/media/video/tvp7002.c
+++ b/drivers/media/video/tvp7002.c
@@ -859,13 +859,17 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
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 @@ static int tvp7002_s_register(struct v4l2_subdev *sd,
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
>
> thanks,
> ---
> ~Randy
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
Hans Verkuil - video4linux developer - sponsored by TANDBERG
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for February 22 (media/video/tvp7002)
2010-02-25 20:34 ` Hans Verkuil
@ 2010-02-25 20:57 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2010-02-25 20:57 UTC (permalink / raw)
To: Hans Verkuil
Cc: linux-next, Stephen Rothwell, LKML, Linux Media Mailing List,
Santiago Nunez-Corrales
On 02/25/10 12:34, Hans Verkuil wrote:
> On Thursday 25 February 2010 17:52:05 Randy Dunlap wrote:
>> On Mon, 22 Feb 2010 08:21:44 -0800 Randy Dunlap wrote:
>>
>>> On 02/21/10 22:22, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Changes since 20100219:
>>>
>>>
>>> drivers/media/video/tvp7002.c:896: error: 'struct tvp7002' has no member named 'registers'
>>
>> same problem in linux-next-20100225.
>>
>> 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.
>
> Anyway, below is a patch that fixes this. Please apply.
>
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Thanks.
> Santiago, I've also fixed the g_register function: it never returned a register
> value in the original code.
>
> Regards,
>
> Hans
>
> diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
> index 0f0270b..5a878bc 100644
> --- a/drivers/media/video/tvp7002.c
> +++ b/drivers/media/video/tvp7002.c
> @@ -859,13 +859,17 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
> 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 @@ static int tvp7002_s_register(struct v4l2_subdev *sd,
> 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
>
>
>
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-25 20:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100222172218.4fd82a45.sfr@canb.auug.org.au>
2010-02-22 16:21 ` linux-next: Tree for February 22 (media/video/tvp7002) Randy Dunlap
2010-02-25 16:52 ` Randy Dunlap
2010-02-25 20:34 ` Hans Verkuil
2010-02-25 20:57 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox