public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: gspca-mercurial fix sonixb driver
@ 2008-07-02 21:26 Hans de Goede
  0 siblings, 0 replies; only message in thread
From: Hans de Goede @ 2008-07-02 21:26 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: video4linux-list

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Hi All,

This patch makes the sonixb gspca driver actually work (tested with
a sweex sn9c102 with tas5110 sensor).

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Regards,

Hans

[-- Attachment #2: gspca-fix-sonixb.patch --]
[-- Type: text/x-patch, Size: 1027 bytes --]

This patch makes the sonixb gspca driver actually work (tested with
a sweex sn9c102 with tas5110 sensor).

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
--- gspca-2bbb47f61a95/linux/drivers/media/video/gspca/sonixb.c.dbg	2008-07-02 11:14:56.000000000 +0200
+++ gspca-2bbb47f61a95/linux/drivers/media/video/gspca/sonixb.c	2008-07-02 23:07:41.000000000 +0200
@@ -344,13 +344,17 @@ static void reg_w(struct usb_device *dev
 			  const __u8 *buffer,
 			  __u16 len)
 {
+	__u8 tmpbuf[0x1f];
+
+	memcpy(tmpbuf, buffer, len);
+
 	usb_control_msg(dev,
 			usb_sndctrlpipe(dev, 0),
 			0x08,			/* request */
 			USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
 			value,
 			0,			/* index */
-			(__u8 *) buffer, len,
+			tmpbuf, len,
 			500);
 }
 
@@ -769,8 +773,8 @@ static void sd_pkt_scan(struct gspca_dev
 							LAST_PACKET,
 							frame,
 							data, 0);
-				data += 12;
-				len -= 12;
+				data += p + 12;
+				len -= p + 12;
 				gspca_frame_add(gspca_dev, FIRST_PACKET,
 						frame, data, len);
 				return;

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-02 21:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 21:26 PATCH: gspca-mercurial fix sonixb driver Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox