diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-08-12 11:08:37 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-14 17:30:33 +0100 |
commit | 4caae9546d2cf7dbc7a12d451f847d7b58912bda (patch) | |
tree | 9c1d71d155a2b9ea691ae59a526d3893f19ba731 /sound/soc | |
parent | bc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff) | |
download | linux-4caae9546d2cf7dbc7a12d451f847d7b58912bda.tar.bz2 |
ASoC: cs42l52: Use case range at appropriate place
The readable registers are in continuous range: 0x01 ~ 0x34.
Use case range syntax makes the code shorter with better readability when
we have a large number of continuous switch cases.
No functional change with this patch.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/cs42l52.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 4de52c9957ac..02d9f3d35547 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -110,58 +110,7 @@ static const struct reg_default cs42l52_reg_defaults[] = { static bool cs42l52_readable_register(struct device *dev, unsigned int reg) { switch (reg) { - case CS42L52_CHIP: - case CS42L52_PWRCTL1: - case CS42L52_PWRCTL2: - case CS42L52_PWRCTL3: - case CS42L52_CLK_CTL: - case CS42L52_IFACE_CTL1: - case CS42L52_IFACE_CTL2: - case CS42L52_ADC_PGA_A: - case CS42L52_ADC_PGA_B: - case CS42L52_ANALOG_HPF_CTL: - case CS42L52_ADC_HPF_FREQ: - case CS42L52_ADC_MISC_CTL: - case CS42L52_PB_CTL1: - case CS42L52_MISC_CTL: - case CS42L52_PB_CTL2: - case CS42L52_MICA_CTL: - case CS42L52_MICB_CTL: - case CS42L52_PGAA_CTL: - case CS42L52_PGAB_CTL: - case CS42L52_PASSTHRUA_VOL: - case CS42L52_PASSTHRUB_VOL: - case CS42L52_ADCA_VOL: - case CS42L52_ADCB_VOL: - case CS42L52_ADCA_MIXER_VOL: - case CS42L52_ADCB_MIXER_VOL: - case CS42L52_PCMA_MIXER_VOL: - case CS42L52_PCMB_MIXER_VOL: - case CS42L52_BEEP_FREQ: - case CS42L52_BEEP_VOL: - case CS42L52_BEEP_TONE_CTL: - case CS42L52_TONE_CTL: - case CS42L52_MASTERA_VOL: - case CS42L52_MASTERB_VOL: - case CS42L52_HPA_VOL: - case CS42L52_HPB_VOL: - case CS42L52_SPKA_VOL: - case CS42L52_SPKB_VOL: - case CS42L52_ADC_PCM_MIXER: - case CS42L52_LIMITER_CTL1: - case CS42L52_LIMITER_CTL2: - case CS42L52_LIMITER_AT_RATE: - case CS42L52_ALC_CTL: - case CS42L52_ALC_RATE: - case CS42L52_ALC_THRESHOLD: - case CS42L52_NOISE_GATE_CTL: - case CS42L52_CLK_STATUS: - case CS42L52_BATT_COMPEN: - case CS42L52_BATT_LEVEL: - case CS42L52_SPK_STATUS: - case CS42L52_TEM_CTL: - case CS42L52_THE_FOLDBACK: - case CS42L52_CHARGE_PUMP: + case CS42L52_CHIP ... CS42L52_CHARGE_PUMP: return true; default: return false; |