From 7f984b55acb6530bf854bfcac13104228f3336c1 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 28 Dec 2010 21:08:57 +0100 Subject: ASoC: codecs: Add missing control_type initialization Some codec drivers do not initialize the control_type field in their private device struct, but still use it when calling snd_soc_codec_set_cache_io. This patch fixes the issue by properly initializing it in the drivers probe functions. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown Cc: stable@kernel.org (for 2.6.37 only) --- sound/soc/codecs/wm8940.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/soc/codecs/wm8940.c') diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 2cb16f895c46..23086e2c976a 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -768,6 +768,7 @@ static __devinit int wm8940_i2c_probe(struct i2c_client *i2c, i2c_set_clientdata(i2c, wm8940); wm8940->control_data = i2c; + wm8940->control_type = SND_SOC_I2C; ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm8940, &wm8940_dai, 1); -- cgit v1.2.3