ASoC: cq93vc: Remove unused state struct
Subsystems (5)
PATCH 1/11 ASoC: cq93vc: Remove unused state struct
While two of the fields in the cq93vc driver state struct are initialized none of them are ever acutally read again. So remove the whole struct.
--- include/linux/mfd/davinci_voicecodec.h | 7 ------- sound/soc/codecs/cq93vc.c | 8 -------- 2 files changed, 15 deletions(-)
include/linux/mfd/davinci_voicecodec.h +0 -7
@@ -99,12 +99,6 @@ struct davinci_vcif {dma_addr_t dma_rx_addr; }; -struct cq93vc { -struct platform_device *pdev; -struct snd_soc_codec *codec; -u32 sysclk; -}; -struct davinci_vc ;struct davinci_vc {
@@ -122,7 +116,6 @@ struct davinci_vc {/* Client devices */ struct davinci_vcif davinci_vcif; - struct cq93vc cq93vc; };#endif
sound/soc/codecs/cq93vc.c +0 -8
@@ -62,14 +62,10 @@ static int cq93vc_mute(struct snd_soc_dai *dai, int mute)static int cq93vc_set_dai_sysclk (struct snd_soc_dai *codec_dai,int clk_id,unsigned int freq,int dir) { -struct snd_soc_codec *codec = codec_dai->codec; -struct davinci_vc *davinci_vc = codec->dev->platform_data; -switch (freq) {case 22579200 :case 27000000 :case 33868800 : - davinci_vc->cq93vc.sysclk = freq;return 0 ; }
@@ -135,10 +131,6 @@ static int cq93vc_resume(struct snd_soc_codec *codec)static int cq93vc_probe (struct snd_soc_codec *codec) { -struct davinci_vc *davinci_vc = codec->dev->platform_data; - - davinci_vc->cq93vc.codec = codec; -/* Off, with power on */ cq93vc_set_bias_level (codec,SND_SOC_BIAS_STANDBY );
Signature · 1 line
1.8.0
PATCH 2/11 ASoC: cq93vc: Cleanup manual bias level transitions
Remove the manual transition back to SND_SOC_BIAS_STANDBY in resume. This is already be automatically handled by the ASoC core.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. While we are at it also remove the unused codec field from the cq93vc struct so the whole probe function can be removed.
--- sound/soc/codecs/cq93vc.c | 25 ------------------------- 1 file changed, 25 deletions(-)
sound/soc/codecs/cq93vc.c +0 -25
@@ -122,28 +122,6 @@ static struct snd_soc_dai_driver cq93vc_dai = { .ops = &cq93vc_dai_ops, }; -static int cq93vc_resume (struct snd_soc_codec *codec) -{ -cq93vc_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int cq93vc_probe (struct snd_soc_codec *codec) -{ -/* Off, with power on */ -cq93vc_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int cq93vc_remove (struct snd_soc_codec *codec) -{ -cq93vc_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} -static struct regmap *cq93vc_get_regmap (struct device *dev) {struct davinci_vc *davinci_vc = dev->platform_data;
@@ -153,9 +131,6 @@ static struct regmap *cq93vc_get_regmap(struct device *dev)static struct snd_soc_codec_driver soc_codec_dev_cq93vc = { .set_bias_level = cq93vc_set_bias_level, - .probe = cq93vc_probe, - .remove = cq93vc_remove, - .resume = cq93vc_resume, .get_regmap = cq93vc_get_regmap, .controls = cq93vc_snd_controls, .num_controls =ARRAY_SIZE (cq93vc_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 02/11] ASoC: cq93vc: Cleanup manual bias level transitions
Quoted 2 lines · Lars-Peter Clausen
Remove the manual transition back to
SND_SOC_BIAS_STANDBYin resume. This is already be automatically handled by the ASoC core.
Applied, thanks.
PATCH 3/11 ASoC: lm49453: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore.
--- sound/soc/codecs/lm49453.c | 8 -------- 1 file changed, 8 deletions(-)
sound/soc/codecs/lm49453.c +0 -8
@@ -1395,15 +1395,7 @@ static struct snd_soc_dai_driver lm49453_dai[] = { }, }; -/* power down chip */ -static int lm49453_remove (struct snd_soc_codec *codec) -{ -lm49453_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_lm49453 = { - .remove = lm49453_remove, .set_bias_level = lm49453_set_bias_level, .controls = lm49453_snd_controls, .num_controls =ARRAY_SIZE (lm49453_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 03/11] ASoC: lm49453: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore.
Applied, thanks.
PATCH 4/11 ASoC: sn95031: Cleanup bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore.
--- sound/soc/codecs/sn95031.c | 9 --------- 1 file changed, 9 deletions(-)
sound/soc/codecs/sn95031.c +0 -9
@@ -870,17 +870,8 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)return 0 ; } -static int sn95031_codec_remove (struct snd_soc_codec *codec) -{ -pr_debug ("codec_remove called\n" ); -sn95031_set_vaud_bias (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} -static struct snd_soc_codec_driver sn95031_codec = { .probe = sn95031_codec_probe, - .remove = sn95031_codec_remove, .set_bias_level = sn95031_set_vaud_bias, .idle_bias_off = true,
Signature · 1 line
1.8.0
Re: [PATCH 04/11] ASoC: sn95031: Cleanup bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore.
Applied, thanks.
PATCH 5/11 ASoC: tlv320aic23: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/tlv320aic23.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)
sound/soc/codecs/tlv320aic23.c +2 -19
@@ -540,19 +540,11 @@ static struct snd_soc_dai_driver tlv320aic23_dai = { .ops = &tlv320aic23_dai_ops, }; -static int tlv320aic23_suspend (struct snd_soc_codec *codec) -{ -tlv320aic23_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} -static int tlv320aic23_resume (struct snd_soc_codec *codec) {struct aic23 *aic23 =snd_soc_codec_get_drvdata (codec);regcache_mark_dirty (aic23->regmap);regcache_sync (aic23->regmap); -tlv320aic23_set_bias_level (codec,SND_SOC_BIAS_STANDBY );return 0 ; }
@@ -562,9 +554,6 @@ static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)/* Reset codec */ snd_soc_write (codec,TLV320AIC23_RESET ,0 ); -/* power on device */ -tlv320aic23_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -snd_soc_write (codec,TLV320AIC23_DIGT ,TLV320AIC23_DEEMP_44K );/* Unmute input */
@@ -589,18 +578,12 @@ static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)return 0 ; } -static int tlv320aic23_remove (struct snd_soc_codec *codec) -{ -tlv320aic23_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = { .probe = tlv320aic23_codec_probe, - .remove = tlv320aic23_remove, - .suspend = tlv320aic23_suspend, .resume = tlv320aic23_resume, .set_bias_level = tlv320aic23_set_bias_level, + .suspend_bias_off = true, + .controls = tlv320aic23_snd_controls, .num_controls =ARRAY_SIZE (tlv320aic23_snd_controls), .dapm_widgets = tlv320aic23_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 05/11] ASoC: tlv320aic23: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 6/11 ASoC: tlv320aix31xx: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/tlv320aic31xx.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-)
sound/soc/codecs/tlv320aic31xx.c +2 -16
@@ -1057,18 +1057,6 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec,return 0 ; } -static int aic31xx_suspend (struct snd_soc_codec *codec) -{ -aic31xx_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int aic31xx_resume (struct snd_soc_codec *codec) -{ -aic31xx_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int aic31xx_codec_probe (struct snd_soc_codec *codec) {int ret =0 ;
@@ -1111,8 +1099,6 @@ static int aic31xx_codec_remove(struct snd_soc_codec *codec) {struct aic31xx_priv *aic31xx =snd_soc_codec_get_drvdata (codec);int i; -/* power down chip */ -aic31xx_set_bias_level (codec,SND_SOC_BIAS_OFF );for (i =0 ; i <ARRAY_SIZE (aic31xx->supplies); i++) regulator_unregister_notifier(aic31xx->supplies[i].consumer,
@@ -1124,9 +1110,9 @@ static int aic31xx_codec_remove(struct snd_soc_codec *codec)static struct snd_soc_codec_driver soc_codec_driver_aic31xx = { .probe = aic31xx_codec_probe, .remove = aic31xx_codec_remove, - .suspend = aic31xx_suspend, - .resume = aic31xx_resume, .set_bias_level = aic31xx_set_bias_level, + .suspend_bias_off = true, + .controls = aic31xx_snd_controls, .num_controls =ARRAY_SIZE (aic31xx_snd_controls), .dapm_widgets = aic31xx_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 06/11] ASoC: tlv320aix31xx: Cleanup manual bias level transitions
Quoted 9 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.Signed-off-by Lars-Peter Clausen <[email protected]>
Quoted 49 lines
--- sound/soc/codecs/tlv320aic31xx.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-)sound/soc/codecs/tlv320aic31xx.c +2
-16@@ -1057,18 +1057,6 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec,return 0 ; } -static int aic31xx_suspend (struct snd_soc_codec *codec) -{ -aic31xx_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int aic31xx_resume (struct snd_soc_codec *codec) -{ -aic31xx_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int aic31xx_codec_probe (struct snd_soc_codec *codec) {int ret =0 ;@@ -1111,8 +1099,6 @@ static int aic31xx_codec_remove(struct snd_soc_codec *codec) {struct aic31xx_priv *aic31xx =snd_soc_codec_get_drvdata (codec);int i; -/* power down chip */ -aic31xx_set_bias_level (codec,SND_SOC_BIAS_OFF );for (i =0 ; i <ARRAY_SIZE (aic31xx->supplies); i++) regulator_unregister_notifier(aic31xx->supplies[i].consumer,@@ -1124,9 +1110,9 @@ static int aic31xx_codec_remove(struct snd_soc_codec *codec)static struct snd_soc_codec_driver soc_codec_driver_aic31xx = { .probe = aic31xx_codec_probe, .remove = aic31xx_codec_remove, - .suspend = aic31xx_suspend, - .resume = aic31xx_resume, .set_bias_level = aic31xx_set_bias_level, + .suspend_bias_off = true, + .controls = aic31xx_snd_controls, .num_controls =ARRAY_SIZE (aic31xx_snd_controls), .dapm_widgets = aic31xx_dapm_widgets,
Re: [PATCH 06/11] ASoC: tlv320aix31xx: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenQuoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 7/11 ASoC: tlv320aic32x4: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/tlv320aic32x4.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-)
sound/soc/codecs/tlv320aic32x4.c +1 -23
@@ -597,18 +597,6 @@ static struct snd_soc_dai_driver aic32x4_dai = { .symmetric_rates = 1, }; -static int aic32x4_suspend (struct snd_soc_codec *codec) -{ -aic32x4_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int aic32x4_resume (struct snd_soc_codec *codec) -{ -aic32x4_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int aic32x4_probe (struct snd_soc_codec *codec) {struct aic32x4_priv *aic32x4 =snd_soc_codec_get_drvdata (codec);
@@ -654,8 +642,6 @@ static int aic32x4_probe(struct snd_soc_codec *codec)snd_soc_write (codec,AIC32X4_RMICPGANIN ,AIC32X4_RMICPGANIN_CM1R_10K ); -aic32x4_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* * Workaround: for an unknown reason, the ADC needs to be powered up * and down for the first capture to work properly. It seems related to
@@ -669,18 +655,10 @@ static int aic32x4_probe(struct snd_soc_codec *codec)return 0 ; } -static int aic32x4_remove (struct snd_soc_codec *codec) -{ -aic32x4_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_aic32x4 = { .probe = aic32x4_probe, - .remove = aic32x4_remove, - .suspend = aic32x4_suspend, - .resume = aic32x4_resume, .set_bias_level = aic32x4_set_bias_level, + .suspend_bias_off = true, .controls = aic32x4_snd_controls, .num_controls =ARRAY_SIZE (aic32x4_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 07/11] ASoC: tlv320aic32x4: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 8/11 ASoC: tlv320aic3x: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore.
--- sound/soc/codecs/tlv320aic3x.c | 1 - 1 file changed, 1 deletion(-)
sound/soc/codecs/tlv320aic3x.c +0 -1
@@ -1491,7 +1491,6 @@ static int aic3x_remove(struct snd_soc_codec *codec)struct aic3x_priv *aic3x =snd_soc_codec_get_drvdata (codec);int i; -aic3x_set_bias_level (codec,SND_SOC_BIAS_OFF );list_del (&aic3x->list);for (i =0 ; i <ARRAY_SIZE (aic3x->supplies); i++) regulator_unregister_notifier(aic3x->supplies[i].consumer,
Signature · 1 line
1.8.0
Re: [PATCH 08/11] ASoC: tlv320aic3x: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore.
Applied, thanks.
PATCH 9/11 ASoC: tlv320dac33: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore.
--- sound/soc/codecs/tlv320dac33.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/tlv320dac33.c +0 -2
@@ -1436,8 +1436,6 @@ static int dac33_soc_remove(struct snd_soc_codec *codec) {struct tlv320dac33_priv *dac33 =snd_soc_codec_get_drvdata (codec); -dac33_set_bias_level (codec,SND_SOC_BIAS_OFF ); -if (dac33->irq >=0 ) {free_irq (dac33->irq, dac33->codec);destroy_workqueue (dac33->dac33_wq);
Signature · 1 line
1.8.0
Re: [PATCH 09/11] ASoC: tlv320dac33: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore.
Applied, thanks.
PATCH 10/11 ASoC: twl4030: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore.
--- sound/soc/codecs/twl4030.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/twl4030.c +0 -2
@@ -2177,8 +2177,6 @@ static int twl4030_soc_remove(struct snd_soc_codec *codec)struct twl4030_priv *twl4030 =snd_soc_codec_get_drvdata (codec);struct twl4030_codec_data *pdata = twl4030->pdata; -twl4030_set_bias_level (codec,SND_SOC_BIAS_OFF ); -if (pdata && pdata->hs_extmute &&gpio_is_valid (pdata->hs_extmute_gpio))gpio_free (pdata->hs_extmute_gpio);
Signature · 1 line
1.8.0
Re: [PATCH 10/11] ASoC: twl4030: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore.
Applied, thanks.
PATCH 11/11 ASoC: twl6040: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/twl6040.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-)
sound/soc/codecs/twl6040.c +1 -22
@@ -1095,25 +1095,6 @@ static struct snd_soc_dai_driver twl6040_dai[] = { }, }; -#ifdef CONFIG_PM -static int twl6040_suspend (struct snd_soc_codec *codec) -{ -twl6040_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} - -static int twl6040_resume (struct snd_soc_codec *codec) -{ -twl6040_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} -#else -#define twl6040_suspend NULL -#define twl6040_resume NULL -#endif -static int twl6040_probe (struct snd_soc_codec *codec) {struct twl6040_data *priv;
@@ -1160,7 +1141,6 @@ static int twl6040_remove(struct snd_soc_codec *codec)struct twl6040_data *priv =snd_soc_codec_get_drvdata (codec);free_irq (priv->plug_irq, codec); -twl6040_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }
@@ -1168,11 +1148,10 @@ static int twl6040_remove(struct snd_soc_codec *codec)static struct snd_soc_codec_driver soc_codec_dev_twl6040 = { .probe = twl6040_probe, .remove = twl6040_remove, - .suspend = twl6040_suspend, - .resume = twl6040_resume, .read = twl6040_read, .write = twl6040_write, .set_bias_level = twl6040_set_bias_level, + .suspend_bias_off = true, .ignore_pmdown_time = true, .controls = twl6040_snd_controls,
Signature · 1 line
1.8.0
Re: [PATCH 11/11] ASoC: twl6040: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
Quoted 2 lines · Lars-Peter Clausen
While two of the fields in the cq93vc driver state struct are initialized none of them are ever acutally read again. So remove the whole struct.
Applied, thanks.