Commit 63fa0a288cfedca681175fe13cf15677e944cdb2
Committed by
Mark Brown
1 parent
728a522224
Exists in
master
and in
38 other branches
ASoC: snd_soc_codec_{readable,writable}_register change default to true
Change the default return value of snd_soc_codec_{readable,writable}_register to true when no codec specific callback for this function is given. Otherwise all registers of that codec will neither be readable nor writable, which is most certainly not what we want. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
sound/soc/soc-core.c
... | ... | @@ -1633,7 +1633,7 @@ |
1633 | 1633 | if (codec->readable_register) |
1634 | 1634 | return codec->readable_register(codec, reg); |
1635 | 1635 | else |
1636 | - return 0; | |
1636 | + return 1; | |
1637 | 1637 | } |
1638 | 1638 | EXPORT_SYMBOL_GPL(snd_soc_codec_readable_register); |
1639 | 1639 | |
... | ... | @@ -1651,7 +1651,7 @@ |
1651 | 1651 | if (codec->writable_register) |
1652 | 1652 | return codec->writable_register(codec, reg); |
1653 | 1653 | else |
1654 | - return 0; | |
1654 | + return 1; | |
1655 | 1655 | } |
1656 | 1656 | EXPORT_SYMBOL_GPL(snd_soc_codec_writable_register); |
1657 | 1657 |