diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-11-12 13:07:35 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:43 -0500 |
commit | a23acec4bca79f2168a5aeacc8d85386b70ae522 (patch) | |
tree | 32c19b01e852e56ccc0c26c93d5dd5136334d108 /drivers | |
parent | e2817029b3f139bd85360536153467bd8f7f863b (diff) |
[media] gspca - ov519: Simplify the LED control functions
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index d60322047265..2484e5222d4a 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -2639,14 +2639,14 @@ static void ov51x_led_control(struct sd *sd, int on) | |||
2639 | switch (sd->bridge) { | 2639 | switch (sd->bridge) { |
2640 | /* OV511 has no LED control */ | 2640 | /* OV511 has no LED control */ |
2641 | case BRIDGE_OV511PLUS: | 2641 | case BRIDGE_OV511PLUS: |
2642 | reg_w(sd, R511_SYS_LED_CTL, on ? 1 : 0); | 2642 | reg_w(sd, R511_SYS_LED_CTL, on); |
2643 | break; | 2643 | break; |
2644 | case BRIDGE_OV518: | 2644 | case BRIDGE_OV518: |
2645 | case BRIDGE_OV518PLUS: | 2645 | case BRIDGE_OV518PLUS: |
2646 | reg_w_mask(sd, R518_GPIO_OUT, on ? 0x02 : 0x00, 0x02); | 2646 | reg_w_mask(sd, R518_GPIO_OUT, 0x02 * on, 0x02); |
2647 | break; | 2647 | break; |
2648 | case BRIDGE_OV519: | 2648 | case BRIDGE_OV519: |
2649 | reg_w_mask(sd, OV519_GPIO_DATA_OUT0, !on, 1); /* 0 / 1 */ | 2649 | reg_w_mask(sd, OV519_GPIO_DATA_OUT0, on, 1); |
2650 | break; | 2650 | break; |
2651 | } | 2651 | } |
2652 | } | 2652 | } |
@@ -2938,7 +2938,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2938 | struct cam *cam = &gspca_dev->cam; | 2938 | struct cam *cam = &gspca_dev->cam; |
2939 | 2939 | ||
2940 | sd->bridge = id->driver_info & BRIDGE_MASK; | 2940 | sd->bridge = id->driver_info & BRIDGE_MASK; |
2941 | sd->invert_led = id->driver_info & BRIDGE_INVERT_LED; | 2941 | sd->invert_led = (id->driver_info & BRIDGE_INVERT_LED) != 0; |
2942 | 2942 | ||
2943 | switch (sd->bridge) { | 2943 | switch (sd->bridge) { |
2944 | case BRIDGE_OV511: | 2944 | case BRIDGE_OV511: |