Skip to content

Commit

Permalink
V4L/DVB: gspca - ov534: Fix unsetting hflip and vflip bits
Browse files Browse the repository at this point in the history
Also set default values unconditionally, for readability.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Max Thrun authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 3149cfb commit eb17107
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ static void sethflip(struct gspca_dev *gspca_dev)
sccb_reg_read(gspca_dev, 0x0c) | 0x40);
else
sccb_reg_write(gspca_dev, 0x0c,
sccb_reg_read(gspca_dev, 0x0c) & 0xbf);
sccb_reg_read(gspca_dev, 0x0c) & ~0x40);
}

static void setvflip(struct gspca_dev *gspca_dev)
Expand All @@ -781,7 +781,7 @@ static void setvflip(struct gspca_dev *gspca_dev)
sccb_reg_read(gspca_dev, 0x0c) | 0x80);
else
sccb_reg_write(gspca_dev, 0x0c,
sccb_reg_read(gspca_dev, 0x0c) & 0x7f);
sccb_reg_read(gspca_dev, 0x0c) & ~0x80);
}

/* this function is called at probe time */
Expand Down Expand Up @@ -815,12 +815,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
sd->awb = AWB_DEF;
sd->aec = AEC_DEF;
sd->sharpness = SHARPNESS_DEF;
#if HFLIP_DEF != 0
sd->hflip = HFLIP_DEF;
#endif
#if VFLIP_DEF != 0
sd->vflip = VFLIP_DEF;
#endif

return 0;
}
Expand Down

0 comments on commit eb17107

Please sign in to comment.