All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-next@vger.kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Subject: Re: linux-next: Tree for February 22 (media/video/tvp7002)
Date: Thu, 25 Feb 2010 12:57:07 -0800	[thread overview]
Message-ID: <4B86E423.3010507@oracle.com> (raw)
In-Reply-To: <201002252134.10071.hverkuil@xs4all.nl>

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, &reg->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, &reg->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

      reply	other threads:[~2010-02-25 20:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22  6:22 linux-next: Tree for February 22 Stephen Rothwell
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B86E423.3010507@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=santiago.nunez@ridgerun.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.