All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cafe_ccic: fix subdev configuration
@ 2010-10-27 13:45 Daniel Drake
  2010-10-27 14:23 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2010-10-27 13:45 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media, corbet

For some reason, commit 1aafeb30104a is missing one change that was
included in the email submission.

The sensor configuration must be passed down to the ov7670 subdev.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 drivers/media/video/cafe_ccic.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 8a07906..21f6f06 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -2065,8 +2065,9 @@ static int cafe_pci_probe(struct pci_dev *pdev,
 		sensor_cfg.clock_speed = 45;
 
 	cam->sensor_addr = 0x42;
-	cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, &cam->i2c_adapter,
-			NULL, "ov7670", cam->sensor_addr, NULL);
+	cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
+			"ov7670", "ov7670", 0, &sensor_cfg, cam->sensor_addr,
+			NULL);
 	if (cam->sensor == NULL) {
 		ret = -ENODEV;
 		goto out_smbus;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cafe_ccic: fix subdev configuration
  2010-10-27 13:45 [PATCH] cafe_ccic: fix subdev configuration Daniel Drake
@ 2010-10-27 14:23 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-27 14:23 UTC (permalink / raw)
  To: Daniel Drake; +Cc: linux-media, corbet

Em 27-10-2010 11:45, Daniel Drake escreveu:
> For some reason, commit 1aafeb30104a is missing one change that was
> included in the email submission.
> 
> The sensor configuration must be passed down to the ov7670 subdev.
> 
> Signed-off-by: Daniel Drake <dsd@laptop.org>
> ---
>  drivers/media/video/cafe_ccic.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
> index 8a07906..21f6f06 100644
> --- a/drivers/media/video/cafe_ccic.c
> +++ b/drivers/media/video/cafe_ccic.c
> @@ -2065,8 +2065,9 @@ static int cafe_pci_probe(struct pci_dev *pdev,
>  		sensor_cfg.clock_speed = 45;
>  
>  	cam->sensor_addr = 0x42;
> -	cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, &cam->i2c_adapter,
> -			NULL, "ov7670", cam->sensor_addr, NULL);
> +	cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
> +			"ov7670", "ov7670", 0, &sensor_cfg, cam->sensor_addr,
> +			NULL);

Sorry... that was my fault. One of the parameters of v4l2_i2c_new_subdev & friends
were removed by a previous patch (the duplicate "ov7670"). I probably didn't fix
the conflict right.

As I don't want to postpone the pull request that I'll do today, waiting for more
days at linux-next, so, I'll apply this patch and send it on a next pull request.

In the interim, could you please test if using this instead will equally work?

	cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
 			NULL, "ov7670", 0, &sensor_cfg, cam->sensor_addr,
			NULL);

(you should test it against my git tree or against linux-next tree).

There's a pending patch to be applied after -rc1 release that will remove the extra
parameter, as is is not needed anymore.

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-27 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 13:45 [PATCH] cafe_ccic: fix subdev configuration Daniel Drake
2010-10-27 14:23 ` Mauro Carvalho Chehab

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.