From a878440d994e11bc3e4eb81d378b32fa32e9d80c Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 1 Apr 2009 08:46:00 -0300 Subject: [PATCH] V4L/DVB (11354): usbvision: use usb_interface.dev for v4l2_device_register Signed-off-by: Janne Grunau Acked-by: Thierry Merle Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/usbvision/usbvision-video.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index fa62a2fd7b22..7db493ca87bd 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c @@ -1522,7 +1522,8 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision) * Returns NULL on error, a pointer to usb_usbvision else. * */ -static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) +static struct usb_usbvision *usbvision_alloc(struct usb_device *dev, + struct usb_interface *intf) { struct usb_usbvision *usbvision; @@ -1531,7 +1532,7 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) return NULL; usbvision->dev = dev; - if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev)) + if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev)) goto err_free; mutex_init(&usbvision->lock); /* available */ @@ -1669,7 +1670,8 @@ static int __devinit usbvision_probe(struct usb_interface *intf, return -ENODEV; } - if ((usbvision = usbvision_alloc(dev)) == NULL) { + usbvision = usbvision_alloc(dev, intf); + if (usbvision == NULL) { dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); return -ENOMEM; } -- 2.20.1