diff options
author | Erik Andrén <erik.andren@gmail.com> | 2008-12-21 15:25:25 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:40:01 -0500 |
commit | 3da3dce5afd267d354427042090aaf6370ebc15c (patch) | |
tree | 48dc08063589760a21a3b0b769dd9f30d4d911bf | |
parent | 7d292de890a2367ddb605f9a52b015e45c10e322 (diff) |
V4L/DVB (10035): m5602: add a start sending hook in the sensor struct
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_sensor.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c index 691b09a94e85..ed906fe31287 100644 --- a/drivers/media/video/gspca/m5602/m5602_core.c +++ b/drivers/media/video/gspca/m5602/m5602_core.c | |||
@@ -242,6 +242,9 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev) | |||
242 | /* Send start command to the camera */ | 242 | /* Send start command to the camera */ |
243 | const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01}; | 243 | const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01}; |
244 | 244 | ||
245 | if (sd->sensor->start) | ||
246 | sd->sensor->start(sd); | ||
247 | |||
245 | memcpy(buf, buffer, sizeof(buffer)); | 248 | memcpy(buf, buffer, sizeof(buffer)); |
246 | err = usb_control_msg(gspca_dev->dev, | 249 | err = usb_control_msg(gspca_dev->dev, |
247 | usb_sndctrlpipe(gspca_dev->dev, 0), | 250 | usb_sndctrlpipe(gspca_dev->dev, 0), |
diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 23c0ef9489fe..261623f0da48 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h | |||
@@ -58,6 +58,9 @@ struct m5602_sensor { | |||
58 | /* Performs a initialization sequence */ | 58 | /* Performs a initialization sequence */ |
59 | int (*init)(struct sd *sd); | 59 | int (*init)(struct sd *sd); |
60 | 60 | ||
61 | /* Executed when the camera starts to send data */ | ||
62 | int (*start)(struct sd *sd); | ||
63 | |||
61 | /* Performs a power down sequence */ | 64 | /* Performs a power down sequence */ |
62 | int (*power_down)(struct sd *sd); | 65 | int (*power_down)(struct sd *sd); |
63 | 66 | ||