diff options
author | Erik Andrén <erik.andren@gmail.com> | 2008-12-21 21:25:25 +0100 |
---|---|---|
committer | Erik Andrén <erik.andren@gmail.com> | 2008-12-21 21:25:25 +0100 |
commit | 8b7f844e3d8b6c9ef3b5159f3b23fc79466df0ed (patch) | |
tree | 5692a432170962c55fddb454b83dad4a845ccf98 /linux/drivers/media/video/gspca | |
parent | 9e743cb43e389adc6843b552f22de1d3f171bb22 (diff) | |
download | mediapointer-dvb-s2-8b7f844e3d8b6c9ef3b5159f3b23fc79466df0ed.tar.gz mediapointer-dvb-s2-8b7f844e3d8b6c9ef3b5159f3b23fc79466df0ed.tar.bz2 |
Add a start sending hook in the sensor struct
From: Erik Andrén <erik.andren@gmail.com>
Priority: normal
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_core.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_sensor.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_core.c b/linux/drivers/media/video/gspca/m5602/m5602_core.c index fd4a1b419..0a43d9383 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_core.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_core.c @@ -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), diff --git a/linux/drivers/media/video/gspca/m5602/m5602_sensor.h b/linux/drivers/media/video/gspca/m5602/m5602_sensor.h index 23c0ef948..261623f0d 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/linux/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -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); |