diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-01-21 01:33:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:46 -0400 |
commit | cde41bb292c5f5475213ebed96cd5f18b51ecd48 (patch) | |
tree | 5d03bc37e864320cd412a300e5f067260a779867 /drivers/media/video/gspca/m5602/m5602_s5k83a.c | |
parent | 57851d0cd0b4b9058a10ca81efc4cb6cbc9323e7 (diff) |
V4L/DVB (11633): gspca - m5602-s5k83a: Move hsync/vsync setup to start function
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_s5k83a.c')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k83a.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/drivers/media/video/gspca/m5602/m5602_s5k83a.c index 646796d21c5b..118ec8f8cbdf 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.c | |||
@@ -299,15 +299,29 @@ static int rotation_thread_function(void *data) | |||
299 | 299 | ||
300 | int s5k83a_start(struct sd *sd) | 300 | int s5k83a_start(struct sd *sd) |
301 | { | 301 | { |
302 | int i, err = 0; | ||
302 | struct s5k83a_priv *sens_priv = sd->sensor_priv; | 303 | struct s5k83a_priv *sens_priv = sd->sensor_priv; |
303 | 304 | ||
304 | /* Create another thread, polling the GPIO ports of the camera to check | 305 | /* Create another thread, polling the GPIO ports of the camera to check |
305 | if it got rotated. This is how the windows driver does it so we have | 306 | if it got rotated. This is how the windows driver does it so we have |
306 | to assume that there is no better way of accomplishing this */ | 307 | to assume that there is no better way of accomplishing this */ |
307 | sens_priv->rotation_thread = kthread_create(rotation_thread_function, | 308 | sens_priv->rotation_thread = kthread_create(rotation_thread_function, |
308 | sd, "rotation thread"); | 309 | sd, "rotation thread"); |
309 | wake_up_process(sens_priv->rotation_thread); | 310 | wake_up_process(sens_priv->rotation_thread); |
310 | 311 | ||
312 | /* Preinit the sensor */ | ||
313 | for (i = 0; i < ARRAY_SIZE(start_s5k83a) && !err; i++) { | ||
314 | u8 data[2] = {start_s5k83a[i][2], start_s5k83a[i][3]}; | ||
315 | if (start_s5k83a[i][0] == SENSOR) | ||
316 | err = m5602_write_sensor(sd, start_s5k83a[i][1], | ||
317 | data, 2); | ||
318 | else | ||
319 | err = m5602_write_bridge(sd, start_s5k83a[i][1], | ||
320 | data[0]); | ||
321 | } | ||
322 | if (err < 0) | ||
323 | return err; | ||
324 | |||
311 | return s5k83a_set_led_indication(sd, 1); | 325 | return s5k83a_set_led_indication(sd, 1); |
312 | } | 326 | } |
313 | 327 | ||