]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (10035): m5602: add a start sending hook in the sensor struct
authorErik Andrén <erik.andren@gmail.com>
Sun, 21 Dec 2008 20:25:25 +0000 (17:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:40:01 +0000 (09:40 -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_core.c
drivers/media/video/gspca/m5602/m5602_sensor.h

index 691b09a94e85e57c47707c2fb6ce0035c1fda89d..ed906fe31287d4350fe16f1b860b966187ed30f3 100644 (file)
@@ -242,6 +242,9 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev)
        /* Send start command to the camera */
        const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01};
 
+       if (sd->sensor->start)
+               sd->sensor->start(sd);
+
        memcpy(buf, buffer, sizeof(buffer));
        err = usb_control_msg(gspca_dev->dev,
                              usb_sndctrlpipe(gspca_dev->dev, 0),
index 23c0ef9489feb187fe25e6ecabc5aa3168963da9..261623f0da4818c220e21f2a0fa052648ac11ba3 100644 (file)
@@ -58,6 +58,9 @@ struct m5602_sensor {
        /* Performs a initialization sequence */
        int (*init)(struct sd *sd);
 
+       /* Executed when the camera starts to send data */
+       int (*start)(struct sd *sd);
+
        /* Performs a power down sequence */
        int (*power_down)(struct sd *sd);