diff options
author | Janne Grunau <j@jannau.net> | 2009-04-01 07:46:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:13 -0400 |
commit | a878440d994e11bc3e4eb81d378b32fa32e9d80c (patch) | |
tree | 683b74a8be4eac87442778705ebcc2b2c1b08300 /drivers/media/video/usbvision/usbvision-video.c | |
parent | 6e7f7b37e719746da67ecfc54a264783d473ca05 (diff) |
V4L/DVB (11354): usbvision: use usb_interface.dev for v4l2_device_register
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/usbvision/usbvision-video.c')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 8 |
1 files 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) | |||
1522 | * Returns NULL on error, a pointer to usb_usbvision else. | 1522 | * Returns NULL on error, a pointer to usb_usbvision else. |
1523 | * | 1523 | * |
1524 | */ | 1524 | */ |
1525 | static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) | 1525 | static struct usb_usbvision *usbvision_alloc(struct usb_device *dev, |
1526 | struct usb_interface *intf) | ||
1526 | { | 1527 | { |
1527 | struct usb_usbvision *usbvision; | 1528 | struct usb_usbvision *usbvision; |
1528 | 1529 | ||
@@ -1531,7 +1532,7 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) | |||
1531 | return NULL; | 1532 | return NULL; |
1532 | 1533 | ||
1533 | usbvision->dev = dev; | 1534 | usbvision->dev = dev; |
1534 | if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev)) | 1535 | if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev)) |
1535 | goto err_free; | 1536 | goto err_free; |
1536 | 1537 | ||
1537 | mutex_init(&usbvision->lock); /* available */ | 1538 | mutex_init(&usbvision->lock); /* available */ |
@@ -1669,7 +1670,8 @@ static int __devinit usbvision_probe(struct usb_interface *intf, | |||
1669 | return -ENODEV; | 1670 | return -ENODEV; |
1670 | } | 1671 | } |
1671 | 1672 | ||
1672 | if ((usbvision = usbvision_alloc(dev)) == NULL) { | 1673 | usbvision = usbvision_alloc(dev, intf); |
1674 | if (usbvision == NULL) { | ||
1673 | dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); | 1675 | dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); |
1674 | return -ENOMEM; | 1676 | return -ENOMEM; |
1675 | } | 1677 | } |