diff options
author | Pascal Terjan <pterjan@mandriva.com> | 2008-03-07 08:22:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-03-20 12:39:01 -0300 |
commit | 974a911d2ae310d7082100e9992d1efdf72d86a5 (patch) | |
tree | 509fe12e57bf0a349c3a522526c133bc536a1349 /drivers/media/video/usbvideo | |
parent | c77990e754af7443246f24ccb2336bbd62b01cc0 (diff) | |
download | op-kernel-dev-974a911d2ae310d7082100e9992d1efdf72d86a5.zip op-kernel-dev-974a911d2ae310d7082100e9992d1efdf72d86a5.tar.gz |
V4L/DVB (7334): usb video: add a device link to usbvideo devices, else hal will ignore them
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>
Diffstat (limited to 'drivers/media/video/usbvideo')
-rw-r--r-- | drivers/media/video/usbvideo/usbvideo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index fb434b5..5d363be 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c @@ -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 : "???", |