lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1204823142.7101.1.camel@plop>
Date:	Thu, 06 Mar 2008 18:05:42 +0100
From:	Pascal Terjan <pterjan@...driva.com>
To:	linux-usb-devel@...ts.sourceforge.net, video4linux-list@...hat.com
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] Add a device link to usbvideo devices, else hal will
	ignore them

Signed-off-by: Pascal Terjan <pterjan@...driva.com>
---
 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 : "???",
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ