summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2009-04-01 13:46:00 +0200
committerJanne Grunau <j@jannau.net>2009-04-01 13:46:00 +0200
commite39683bbff5c82187cc7d0894f859d875b1b62de (patch)
treedd188af9af2fb538202be4adfc2a372aa85faeea
parent4ad3ea8b9d538ad4a929c87979fd4118ec0c0508 (diff)
downloadmediapointer-dvb-s2-e39683bbff5c82187cc7d0894f859d875b1b62de.tar.gz
mediapointer-dvb-s2-e39683bbff5c82187cc7d0894f859d875b1b62de.tar.bz2
usbvision: use usb_interface.dev for v4l2_device_register
From: Janne Grunau <j@jannau.net> Priority: normal Signed-off-by: Janne Grunau <j@jannau.net> Acked-by: Thierry Merle <thierry.merle@free.fr>
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-video.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c
index fa62a2fd7..7db493ca8 100644
--- a/linux/drivers/media/video/usbvision/usbvision-video.c
+++ b/linux/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;
}