[patch] UVC driver on FreeBSD 8/9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Linux Kernel]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [DVB Maintainers]     [Linux USB]     [Yosemite Information]

Add to Google Powered by Linux