Skip to content

Commit

Permalink
[media] cx231xx: use bitwise negate instead of logical
Browse files Browse the repository at this point in the history
Bitwise negate was intended here.  INPUT_SEL_MASK is 0x30.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent a3fa904 commit 5f63306
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/cx231xx/cx231xx-avcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux)

if (ch1_setting != 0) {
status = afe_read_byte(dev, ADC_INPUT_CH1, &value);
value &= (!INPUT_SEL_MASK);
value &= ~INPUT_SEL_MASK;
value |= (ch1_setting - 1) << 4;
value &= 0xff;
status = afe_write_byte(dev, ADC_INPUT_CH1, value);
}

if (ch2_setting != 0) {
status = afe_read_byte(dev, ADC_INPUT_CH2, &value);
value &= (!INPUT_SEL_MASK);
value &= ~INPUT_SEL_MASK;
value |= (ch2_setting - 1) << 4;
value &= 0xff;
status = afe_write_byte(dev, ADC_INPUT_CH2, value);
Expand All @@ -292,7 +292,7 @@ int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux)
7 less than the input number */
if (ch3_setting != 0) {
status = afe_read_byte(dev, ADC_INPUT_CH3, &value);
value &= (!INPUT_SEL_MASK);
value &= ~INPUT_SEL_MASK;
value |= (ch3_setting - 1) << 4;
value &= 0xff;
status = afe_write_byte(dev, ADC_INPUT_CH3, value);
Expand Down

0 comments on commit 5f63306

Please sign in to comment.