diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-12-03 18:01:54 +0100 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-12-03 18:01:54 +0100 |
commit | 5b67d9e00e803d51963fb07cd32160f3314abfaa (patch) | |
tree | dcf03c7b196d80a6187264eb596447b8f27b3562 /linux/drivers/media/video/gspca/ov534.c | |
parent | 21f9b7166963112dcef346971b1ba1df42014c79 (diff) | |
download | mediapointer-dvb-s2-5b67d9e00e803d51963fb07cd32160f3314abfaa.tar.gz mediapointer-dvb-s2-5b67d9e00e803d51963fb07cd32160f3314abfaa.tar.bz2 |
gspca: Simplify frame rate setting and debug in ov534.
From: Antonio Ospite <ospite@studenti.unina.it>
Priority: normal
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/ov534.c')
-rw-r--r-- | linux/drivers/media/video/gspca/ov534.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/linux/drivers/media/video/gspca/ov534.c b/linux/drivers/media/video/gspca/ov534.c index a574be09b..b26faae8d 100644 --- a/linux/drivers/media/video/gspca/ov534.c +++ b/linux/drivers/media/video/gspca/ov534.c @@ -48,7 +48,6 @@ static int frame_rate; /* specific webcam descriptor */ struct sd { struct gspca_dev gspca_dev; /* !! must be the first item */ - __u8 frame_rate; }; /* V4L2 controls supported by the driver */ @@ -358,45 +357,38 @@ static int sd_config(struct gspca_dev *gspca_dev, /* this function is called at probe and resume time */ static int sd_init(struct gspca_dev *gspca_dev) { - struct sd *sd = (struct sd *)gspca_dev; - ov534_setup(gspca_dev->dev); + int fr; - if (frame_rate > 0) - sd->frame_rate = frame_rate; + ov534_setup(gspca_dev->dev); - PDEBUG(D_PROBE, "frame_rate = %d", sd->frame_rate); + fr = frame_rate; - switch (sd->frame_rate) { + switch (fr) { case 50: sccb_reg_write(gspca_dev->dev, 0x11, 0x01); - sccb_check_status(gspca_dev->dev); sccb_reg_write(gspca_dev->dev, 0x0d, 0x41); - sccb_check_status(gspca_dev->dev); ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x02); break; case 40: sccb_reg_write(gspca_dev->dev, 0x11, 0x02); - sccb_check_status(gspca_dev->dev); sccb_reg_write(gspca_dev->dev, 0x0d, 0xc1); - sccb_check_status(gspca_dev->dev); ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x04); break; - case 30: +/* case 30: */ default: + fr = 30; sccb_reg_write(gspca_dev->dev, 0x11, 0x04); - sccb_check_status(gspca_dev->dev); sccb_reg_write(gspca_dev->dev, 0x0d, 0x81); - sccb_check_status(gspca_dev->dev); ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x02); break; case 15: sccb_reg_write(gspca_dev->dev, 0x11, 0x03); - sccb_check_status(gspca_dev->dev); sccb_reg_write(gspca_dev->dev, 0x0d, 0x41); - sccb_check_status(gspca_dev->dev); ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x04); break; - }; + } + + PDEBUG(D_PROBE, "frame_rate: %d", fr); return 0; } |