From d74bcaaeb66826192c9e361cbfe8fd1ffaccf74e Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 9 Nov 2014 17:00:59 +0100 Subject: ASoC: wm5102: Move ultrasonic response settings lock to the driver level The wm5102 driver currently uses the snd_soc_codec mutex to protect its ultrasonic response settings from concurrent access. This patch moves this lock to the driver level. This will allow us to eventually remove the snd_soc_codec mutex. Signed-off-by: Lars-Peter Clausen Acked-by: Charles Keepax Signed-off-by: Mark Brown --- include/linux/mfd/arizona/core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/mfd') diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index f34723f7663c..910e3aa1e965 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h @@ -141,6 +141,7 @@ struct arizona { uint16_t dac_comp_coeff; uint8_t dac_comp_enabled; + struct mutex dac_comp_lock; }; int arizona_clk32k_enable(struct arizona *arizona); -- cgit v1.2.3-58-ga151 From 002fe7c831404d179266cfe0dad00a67333256f1 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 26 Nov 2014 20:57:50 +0100 Subject: 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. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/linux/mfd/davinci_voicecodec.h | 7 ------- sound/soc/codecs/cq93vc.c | 8 -------- 2 files changed, 15 deletions(-) (limited to 'include/linux/mfd') diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h index cb01496bfa49..8e1cdbef3dad 100644 --- a/include/linux/mfd/davinci_voicecodec.h +++ b/include/linux/mfd/davinci_voicecodec.h @@ -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 diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c index 537327c7f7f1..036a877746b9 100644 --- a/sound/soc/codecs/cq93vc.c +++ b/sound/soc/codecs/cq93vc.c @@ -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); -- cgit v1.2.3-58-ga151