aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/max98095.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-29 22:54:18 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-29 22:54:18 -0400
commitd21685ec258f803d3badae5eae821383a34815a9 (patch)
tree7ab60a2a5d557a4f345b01a79ca2f877c06d9b92 /sound/soc/codecs/max98095.c
parent74ab24af4fe165de5af01d0507250dd099f096b0 (diff)
parentea02c63d57d7ec099f66ddb2942b4022e865cd5f (diff)
Merge branch 'for-2.6.40' into for-2.6.41
Diffstat (limited to 'sound/soc/codecs/max98095.c')
-rw-r--r--sound/soc/codecs/max98095.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index fe19677bf4b5..872a5fa4bf1f 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1870,16 +1870,14 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
1870 1870
1871 BUG_ON(channel > 1); 1871 BUG_ON(channel > 1);
1872 1872
1873 cdata = &max98095->dai[channel]; 1873 if (!pdata || !max98095->eq_textcnt)
1874 return 0;
1874 1875
1875 if (sel >= pdata->eq_cfgcnt) 1876 if (sel >= pdata->eq_cfgcnt)
1876 return -EINVAL; 1877 return -EINVAL;
1877 1878
1879 cdata = &max98095->dai[channel];
1878 cdata->eq_sel = sel; 1880 cdata->eq_sel = sel;
1879
1880 if (!pdata || !max98095->eq_textcnt)
1881 return 0;
1882
1883 fs = cdata->rate; 1881 fs = cdata->rate;
1884 1882
1885 /* Find the selected configuration with nearest sample rate */ 1883 /* Find the selected configuration with nearest sample rate */
@@ -2018,16 +2016,14 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
2018 2016
2019 BUG_ON(channel > 1); 2017 BUG_ON(channel > 1);
2020 2018
2021 cdata = &max98095->dai[channel]; 2019 if (!pdata || !max98095->bq_textcnt)
2020 return 0;
2022 2021
2023 if (sel >= pdata->bq_cfgcnt) 2022 if (sel >= pdata->bq_cfgcnt)
2024 return -EINVAL; 2023 return -EINVAL;
2025 2024
2025 cdata = &max98095->dai[channel];
2026 cdata->bq_sel = sel; 2026 cdata->bq_sel = sel;
2027
2028 if (!pdata || !max98095->bq_textcnt)
2029 return 0;
2030
2031 fs = cdata->rate; 2027 fs = cdata->rate;
2032 2028
2033 /* Find the selected configuration with nearest sample rate */ 2029 /* Find the selected configuration with nearest sample rate */