summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvideo
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-03-07 08:22:57 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-07 08:22:57 +0000
commitef49ec180c87df216e41d7ad6337aac6c2a359e7 (patch)
tree9a349e6ae60c8e01015ad76cd9dc1defa3e37e5a /linux/drivers/media/video/usbvideo
parent8c34ccf509dbd0775074c48d5a88b61a7bdc924e (diff)
downloadmediapointer-dvb-s2-ef49ec180c87df216e41d7ad6337aac6c2a359e7.tar.gz
mediapointer-dvb-s2-ef49ec180c87df216e41d7ad6337aac6c2a359e7.tar.bz2
usb video: add a device link to usbvideo devices, else hal will ignore them
From: Pascal Terjan <pterjan@mandriva.com> 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 'linux/drivers/media/video/usbvideo')
-rw-r--r--linux/drivers/media/video/usbvideo/usbvideo.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.c b/linux/drivers/media/video/usbvideo/usbvideo.c
index f685aca2f..0cd01371d 100644
--- a/linux/drivers/media/video/usbvideo/usbvideo.c
+++ b/linux/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 : "???",