[5,of,8] pvrusb2: use usb_interface.dev for v4l2_device_register

Message ID 20090329145908.GF17855@aniel (mailing list archive)
State Superseded, archived
Headers

Commit Message

Janne Grunau March 29, 2009, 2:59 p.m. UTC
  
  

Comments

Mike Isely April 1, 2009, 2:02 a.m. UTC | #1
This patch will not at all impact the operation of the pvrusb2 driver, 
and if associating with the USB interface's device node is preferred 
then I'm fine with it.

Acked-by: Mike Isely <isely@pobox.com>

Mauro: Is this series going to be pulled into v4l-dvb or shall I just 
bring this one specific change into my pvrusb2 repo?  Is there any 
reason not to pull it?

  -Mike


On Sun, 29 Mar 2009, Janne Grunau wrote:

> # HG changeset patch
> # User Janne Grunau <j@jannau.net>
> # Date 1238338428 -7200
> # Node ID 2d52ac089920f9ac36960c0245442fd89a06bb75
> # Parent  01af508490af3bc9c939c36001d6989e2c147aa0
> pvrusb2: use usb_interface.dev for v4l2_device_register
> 
> Priority: normal
> 
> Signed-off-by: Janne Grunau <j@jannau.net>
> 
> diff -r 01af508490af -r 2d52ac089920 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
> --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	Sun Mar 29 16:53:48 2009 +0200
> +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	Sun Mar 29 16:53:48 2009 +0200
> @@ -2591,7 +2591,7 @@
>  	hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL);
>  	if (!hdw->ctl_read_urb) goto fail;
>  
> -	if (v4l2_device_register(&usb_dev->dev, &hdw->v4l2_dev) != 0) {
> +	if (v4l2_device_register(&intf->dev, &hdw->v4l2_dev) != 0) {
>  		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
>  			   "Error registering with v4l core, giving up");
>  		goto fail;
> --
> 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
>
  
Mauro Carvalho Chehab April 1, 2009, 9:37 a.m. UTC | #2
On Tue, 31 Mar 2009 21:02:16 -0500 (CDT)
Mike Isely <isely@isely.net> wrote:

> 
> This patch will not at all impact the operation of the pvrusb2 driver, 
> and if associating with the USB interface's device node is preferred 
> then I'm fine with it.
> 
> Acked-by: Mike Isely <isely@pobox.com>
> 
> Mauro: Is this series going to be pulled into v4l-dvb or shall I just 
> bring this one specific change into my pvrusb2 repo?  Is there any 
> reason not to pull it?

I'll take care on it on the next time I'll apply patchwork patches. I suspect
that Janne preferred to send via email for people to better analyse the impacts.
> 
>   -Mike
> 
> 
> On Sun, 29 Mar 2009, Janne Grunau wrote:
> 
> > # HG changeset patch
> > # User Janne Grunau <j@jannau.net>
> > # Date 1238338428 -7200
> > # Node ID 2d52ac089920f9ac36960c0245442fd89a06bb75
> > # Parent  01af508490af3bc9c939c36001d6989e2c147aa0
> > pvrusb2: use usb_interface.dev for v4l2_device_register
> > 
> > Priority: normal
> > 
> > Signed-off-by: Janne Grunau <j@jannau.net>
> > 
> > diff -r 01af508490af -r 2d52ac089920 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
> > --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	Sun Mar 29 16:53:48 2009 +0200
> > +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	Sun Mar 29 16:53:48 2009 +0200
> > @@ -2591,7 +2591,7 @@
> >  	hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL);
> >  	if (!hdw->ctl_read_urb) goto fail;
> >  
> > -	if (v4l2_device_register(&usb_dev->dev, &hdw->v4l2_dev) != 0) {
> > +	if (v4l2_device_register(&intf->dev, &hdw->v4l2_dev) != 0) {
> >  		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
> >  			   "Error registering with v4l core, giving up");
> >  		goto fail;
> > --
> > 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
> > 
> 




Cheers,
Mauro
--
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
  
Janne Grunau April 1, 2009, 11:13 a.m. UTC | #3
On Wed, Apr 01, 2009 at 06:37:18AM -0300, Mauro Carvalho Chehab wrote:
> On Tue, 31 Mar 2009 21:02:16 -0500 (CDT)
> Mike Isely <isely@isely.net> wrote:
> 
> > 
> > This patch will not at all impact the operation of the pvrusb2 driver, 
> > and if associating with the USB interface's device node is preferred 
> > then I'm fine with it.
> > 
> > Acked-by: Mike Isely <isely@pobox.com>

Thanks, added.

> > Mauro: Is this series going to be pulled into v4l-dvb or shall I just 
> > bring this one specific change into my pvrusb2 repo?  Is there any 
> > reason not to pull it?
> 
> I'll take care on it on the next time I'll apply patchwork patches.

You don't need to. My plan was to send a pull request once I have enough
feedback. I should have said that in the intro mail.

> I suspect
> that Janne preferred to send via email for people to better analyse the impacts.

Yes, exactly.

Janne
--
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
  

Patch

# HG changeset patch
# User Janne Grunau <j@jannau.net>
# Date 1238338428 -7200
# Node ID 2d52ac089920f9ac36960c0245442fd89a06bb75
# Parent  01af508490af3bc9c939c36001d6989e2c147aa0
pvrusb2: use usb_interface.dev for v4l2_device_register

Priority: normal

Signed-off-by: Janne Grunau <j@jannau.net>

diff -r 01af508490af -r 2d52ac089920 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	Sun Mar 29 16:53:48 2009 +0200
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	Sun Mar 29 16:53:48 2009 +0200
@@ -2591,7 +2591,7 @@ 
 	hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL);
 	if (!hdw->ctl_read_urb) goto fail;
 
-	if (v4l2_device_register(&usb_dev->dev, &hdw->v4l2_dev) != 0) {
+	if (v4l2_device_register(&intf->dev, &hdw->v4l2_dev) != 0) {
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
 			   "Error registering with v4l core, giving up");
 		goto fail;
--
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