]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
V4L/DVB (7334): usb video: add a device link to usbvideo devices, else hal will ignor...
authorPascal Terjan <pterjan@mandriva.com>
Fri, 7 Mar 2008 11:22:57 +0000 (08:22 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 20 Mar 2008 15:39:01 +0000 (12:39 -0300)
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/usbvideo/usbvideo.c

index fb434b5602a3d5e2c8a76fccb45c9eeba5fd9e8a..5d363be7bc735762475576cb9e7dc6db43f04b80 100644 (file)
@@ -1034,6 +1034,11 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
                info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx",
                     __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits);
        }
+       if (uvd->dev == NULL) {
+               err("%s: uvd->dev == NULL", __FUNCTION__);
+               return -EINVAL;
+       }
+       uvd->vdev.dev=&(uvd->dev->dev);
        if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
                err("%s: video_register_device failed", __FUNCTION__);
                return -EPIPE;
@@ -1041,10 +1046,6 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
        if (uvd->debug > 1) {
                info("%s: video_register_device() successful", __FUNCTION__);
        }
-       if (uvd->dev == NULL) {
-               err("%s: uvd->dev == NULL", __FUNCTION__);
-               return -EINVAL;
-       }
 
        info("%s on /dev/video%d: canvas=%s videosize=%s",
             (uvd->handle != NULL) ? uvd->handle->drvName : "???",