aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2008-12-30 05:47:11 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:38 -0400
commite335f224e35f413775a549889318afe6bd0342b0 (patch)
treedd5cbc7175521ff4e677b3d2a8f9394b3b1a7000 /drivers/media
parent3d3ec926e98bc10c4c48ee7422aecdc335ab1222 (diff)
V4L/DVB (11410): gspca - m5602-ov9650: Always init the ov9650 before starting a stream
This is a hack preventing a suspend-to-ram/disk regression. Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov9650.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c
index bbf91356096c..6581479c0b30 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov9650.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c
@@ -139,6 +139,7 @@ int ov9650_init(struct sd *sd)
139 data = 0x30; 139 data = 0x30;
140 err = m5602_write_sensor(sd, OV9650_MVFP, &data, 1); 140 err = m5602_write_sensor(sd, OV9650_MVFP, &data, 1);
141 } 141 }
142
142 return err; 143 return err;
143} 144}
144 145
@@ -147,6 +148,10 @@ int ov9650_start(struct sd *sd)
147 int i, err = 0; 148 int i, err = 0;
148 struct cam *cam = &sd->gspca_dev.cam; 149 struct cam *cam = &sd->gspca_dev.cam;
149 150
151 err = ov9650_init(sd);
152 if (err < 0)
153 return err;
154
150 for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) { 155 for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) {
151 if (res_init_ov9650[i][0] == BRIDGE) 156 if (res_init_ov9650[i][0] == BRIDGE)
152 err = m5602_write_bridge(sd, res_init_ov9650[i][1], res_init_ov9650[i][2]); 157 err = m5602_write_bridge(sd, res_init_ov9650[i][1], res_init_ov9650[i][2]);