Commit 18c0ecf1 authored by Roel Kluin's avatar Roel Kluin Committed by Mauro Carvalho Chehab

V4L/DVB (7139): add parentheses

'!' has a higher priority than '&': bitanding has no effect.
Signed-off-by: default avatarRoel Kluin <12o3l@tiscali.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 427d20c4
...@@ -1571,14 +1571,14 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip, ...@@ -1571,14 +1571,14 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip,
ctrl->value=chip->muted; ctrl->value=chip->muted;
return 0; return 0;
case V4L2_CID_AUDIO_VOLUME: case V4L2_CID_AUDIO_VOLUME:
if (!desc->flags & CHIP_HAS_VOLUME) if (!(desc->flags & CHIP_HAS_VOLUME))
break; break;
ctrl->value = max(chip->left,chip->right); ctrl->value = max(chip->left,chip->right);
return 0; return 0;
case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_BALANCE:
{ {
int volume; int volume;
if (!desc->flags & CHIP_HAS_VOLUME) if (!(desc->flags & CHIP_HAS_VOLUME))
break; break;
volume = max(chip->left,chip->right); volume = max(chip->left,chip->right);
if (volume) if (volume)
...@@ -1621,7 +1621,7 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip, ...@@ -1621,7 +1621,7 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip,
{ {
int volume,balance; int volume,balance;
if (!desc->flags & CHIP_HAS_VOLUME) if (!(desc->flags & CHIP_HAS_VOLUME))
break; break;
volume = max(chip->left,chip->right); volume = max(chip->left,chip->right);
...@@ -1642,7 +1642,7 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip, ...@@ -1642,7 +1642,7 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip,
case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_BALANCE:
{ {
int volume, balance; int volume, balance;
if (!desc->flags & CHIP_HAS_VOLUME) if (!(desc->flags & CHIP_HAS_VOLUME))
break; break;
volume = max(chip->left,chip->right); volume = max(chip->left,chip->right);
...@@ -1702,7 +1702,7 @@ static int chip_command(struct i2c_client *client, ...@@ -1702,7 +1702,7 @@ static int chip_command(struct i2c_client *client,
break; break;
case V4L2_CID_AUDIO_VOLUME: case V4L2_CID_AUDIO_VOLUME:
case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_BALANCE:
if (!desc->flags & CHIP_HAS_VOLUME) if (!(desc->flags & CHIP_HAS_VOLUME))
return -EINVAL; return -EINVAL;
break; break;
case V4L2_CID_AUDIO_BASS: case V4L2_CID_AUDIO_BASS:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment