Skip to contentSkip to conversation

ASoC: ak4535: Set codec->hw_write to i2c_master_send

PATCH In review Axel Lin 2 participants 3 messages Oct 5, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: ak4535: Set codec->hw_write to i2c_master_send

It was removed in commit f0fba2ad
"ASoC: multi-component - ASoC Multi-Component Support".

Add it back, otherwise codec->hw_write points to NULL.

---
 sound/soc/codecs/ak4535.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/ak4535.c +1 -0
index e1a214e..00cc92c 100644
@@ -439,6 +439,7 @@ static int ak4535_probe(struct snd_soc_codec *codec)
 
 	printk(KERN_INFO "AK4535 Audio Codec %s", AK4535_VERSION);
 
+	codec->hw_write = (hw_write_t)i2c_master_send;
 	codec->control_data = ak4535->control_data;
 
 	/* power on device */
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 4 lines · Axel Lin

It was removed in commit f0fba2ad
"ASoC: multi-component - ASoC Multi-Component Support".

Add it back, otherwise codec->hw_write points to NULL.

It's better to fix the driver not to use hw_write any more, it's broken without anyway.

author
#2 lore raw

2011/10/6 Mark Brown <[email protected]>:

Quoted 9 lines · Axel Lin
Quoted 4 lines

It was removed in commit f0fba2ad
"ASoC: multi-component - ASoC Multi-Component Support".

Add it back, otherwise codec->hw_write points to NULL.

It's better to fix the driver not to use hw_write any more, it's broken without anyway.

It's better convert to soc-cache.
But this one-line-fix may be ok for 3.1.