[3,of,6] usbvision: use usb_interface.dev for v4l2_device_register
Commit Message
# HG changeset patch
# User Janne Grunau <j@jannau.net>
# Date 1238190800 -3600
# Node ID 09d6b9873181402892bb746d101b1b22b245208d
# Parent edca57a287041646c86b404852ef9abf0ecd6c72
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>
@@ -1530,7 +1530,8 @@
* 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;
@@ -1539,7 +1540,7 @@
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 */
@@ -1677,7 +1678,8 @@
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;
}
--
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