mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ASoC: dapm: harden use of lookup tables
To detect potential errors, let's add: a) build-time warnings when the table size isn't aligned with the enum list b) run-time warnings when the values are not initialized. This requires an increase by one of all values to avoid the default 0. Suggested-by: Takashi Iwai <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
e29fe437ea
commit
f13d4b5f85
2 changed files with 85 additions and 76 deletions
|
|
@ -523,6 +523,9 @@ enum snd_soc_dapm_type {
|
|||
snd_soc_dapm_asrc, /* DSP/CODEC ASRC component */
|
||||
snd_soc_dapm_encoder, /* FW/SW audio encoder component */
|
||||
snd_soc_dapm_decoder, /* FW/SW audio decoder component */
|
||||
|
||||
/* Don't edit below this line */
|
||||
SND_SOC_DAPM_TYPE_COUNT
|
||||
};
|
||||
|
||||
enum snd_soc_dapm_subclass {
|
||||
|
|
|
|||
Loading…
Reference in a new issue