Web lists-archives.com

[patch] UVC driver on FreeBSD 8/9




Hi,

The attached patch fixes a segfault on AMD64, because the USB pipe type is of 
kind "void *" on FreeBSD, whilst on Linux it is an integer. Using long type 
instead of int type allows the code to work on both systems.

Please verify and commit the attached patches!

--HPS
--- uvc_status.c.orig	2010-01-03 21:21:21.000000000 +0100
+++ uvc_status.c	2010-01-03 21:22:04.000000000 +0100
@@ -174,7 +174,7 @@ static void uvc_status_complete(struct u
 int uvc_status_init(struct uvc_device *dev)
 {
 	struct usb_host_endpoint *ep = dev->int_ep;
-	unsigned int pipe;
+	unsigned long pipe;
 	int interval;
 
 	if (ep == NULL)
--- uvc_video.c.orig	2010-01-03 21:21:35.000000000 +0100
+++ uvc_video.c	2010-01-03 21:22:48.000000000 +0100
@@ -34,7 +34,7 @@ static int __uvc_query_ctrl(struct uvc_d
 			int timeout)
 {
 	__u8 type = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
-	unsigned int pipe;
+	unsigned long pipe;
 
 	pipe = (query & 0x80) ? usb_rcvctrlpipe(dev->udev, 0)
 			      : usb_sndctrlpipe(dev->udev, 0);
@@ -887,7 +887,8 @@ static int uvc_init_video_bulk(struct uv
 	struct usb_host_endpoint *ep, gfp_t gfp_flags)
 {
 	struct urb *urb;
-	unsigned int npackets, pipe, i;
+	unsigned int npackets, i;
+	unsigned long pipe;
 	u16 psize;
 	u32 size;
 
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list