V4L/DVB (10001): gspca - m5602: Minor fixes
authorErik Andrén <erik.andren@gmail.com>
Thu, 20 Nov 2008 06:41:44 +0000 (03:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:39:45 +0000 (09:39 -0200)
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/m5602/m5602_bridge.h
drivers/media/video/gspca/m5602/m5602_core.c

index c1c7ce524f8adb754a61701bc489be96072225e3..35db1bb9d576892fa00214485c9f26b7d8ddc5cd 100644 (file)
@@ -109,7 +109,6 @@ static const unsigned char sensor_urb_skeleton[] = {
        0x13, M5602_XB_I2C_CTRL, 0x81, 0x11
 };
 
-/* m5602 device descriptor, currently it just wraps the m5602_camera struct */
 struct sd {
        struct gspca_dev gspca_dev;
 
index 059c4d2ffbc2c5244b1108233a9714f85c9b77a5..b2a5ad4fea59f0b70a666b3983a53aee1d7f8765 100644 (file)
@@ -150,11 +150,12 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev)
 
        /* Send start command to the camera */
        const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01};
+
        memcpy(buf, buffer, sizeof(buffer));
        err = usb_control_msg(gspca_dev->dev,
                              usb_sndctrlpipe(gspca_dev->dev, 0),
                              0x04, 0x40, 0x19, 0x0000, buf,
-                             4, M5602_URB_MSG_TIMEOUT);
+                             sizeof(buffer), M5602_URB_MSG_TIMEOUT);
 
        PDEBUG(D_STREAM, "Transfer started");
        return (err < 0) ? err : 0;
@@ -284,6 +285,7 @@ static int __init mod_m5602_init(void)
        PDEBUG(D_PROBE, "registered");
        return 0;
 }
+
 static void __exit mod_m5602_exit(void)
 {
        usb_deregister(&sd_driver);