diff options
-rw-r--r-- | drivers/media/video/tvaudio.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index fb46ce4a1090..3720f0e03a16 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -1639,13 +1639,13 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip, | |||
1639 | return 0; | 1639 | return 0; |
1640 | } | 1640 | } |
1641 | case V4L2_CID_AUDIO_BASS: | 1641 | case V4L2_CID_AUDIO_BASS: |
1642 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1642 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1643 | break; | 1643 | break; |
1644 | ctrl->value = chip->bass; | 1644 | ctrl->value = chip->bass; |
1645 | return 0; | 1645 | return 0; |
1646 | case V4L2_CID_AUDIO_TREBLE: | 1646 | case V4L2_CID_AUDIO_TREBLE: |
1647 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1647 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1648 | return -EINVAL; | 1648 | break; |
1649 | ctrl->value = chip->treble; | 1649 | ctrl->value = chip->treble; |
1650 | return 0; | 1650 | return 0; |
1651 | } | 1651 | } |
@@ -1705,16 +1705,15 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip, | |||
1705 | return 0; | 1705 | return 0; |
1706 | } | 1706 | } |
1707 | case V4L2_CID_AUDIO_BASS: | 1707 | case V4L2_CID_AUDIO_BASS: |
1708 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1708 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1709 | break; | 1709 | break; |
1710 | chip->bass = ctrl->value; | 1710 | chip->bass = ctrl->value; |
1711 | chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); | 1711 | chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); |
1712 | 1712 | ||
1713 | return 0; | 1713 | return 0; |
1714 | case V4L2_CID_AUDIO_TREBLE: | 1714 | case V4L2_CID_AUDIO_TREBLE: |
1715 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1715 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1716 | return -EINVAL; | 1716 | break; |
1717 | |||
1718 | chip->treble = ctrl->value; | 1717 | chip->treble = ctrl->value; |
1719 | chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); | 1718 | chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); |
1720 | 1719 | ||
@@ -1761,7 +1760,7 @@ static int chip_command(struct i2c_client *client, | |||
1761 | break; | 1760 | break; |
1762 | case V4L2_CID_AUDIO_BASS: | 1761 | case V4L2_CID_AUDIO_BASS: |
1763 | case V4L2_CID_AUDIO_TREBLE: | 1762 | case V4L2_CID_AUDIO_TREBLE: |
1764 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1763 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1765 | return -EINVAL; | 1764 | return -EINVAL; |
1766 | break; | 1765 | break; |
1767 | default: | 1766 | default: |