Skip to contentSkip to conversation

UVC driver on FreeBSD 8/9

PATCH New Hans Petter Selasky 1 participant 1 message Jan 4, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 renamed from uvc_status.c.orig +1 -1
@@ -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 renamed from uvc_video.c.orig +3 -2
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list