aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8728.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2009-03-02 20:41:00 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-04 17:29:47 -0500
commit6335d05548eece40092000aa91b64a50310d69d5 (patch)
treeac72c74562f349879a127b4067827476a7875c88 /sound/soc/codecs/wm8728.c
parentff09d49ad0176a5f52a398c137a7ff5f669d6be4 (diff)
ASoC: make ops a pointer in 'struct snd_soc_dai'
Considering the fact that most cpu_dai or codec_dai are using a same 'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better made a pointer instead, to make sharing easier and code a bit cleaner. The patch below is rather preliminary since the asoc tree is being actively developed, and this touches almost every piece of code, (and possibly many others in development need to be changed as well). Building of all codecs are OK, yet to every SoC, I didn't test that. Signed-off-by: Eric Miao <eric.miao@marvell.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8728.c')
-rw-r--r--sound/soc/codecs/wm8728.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index f8363b308895..e7ff2121ede9 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -244,6 +244,12 @@ static int wm8728_set_bias_level(struct snd_soc_codec *codec,
244#define WM8728_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 244#define WM8728_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
245 SNDRV_PCM_FMTBIT_S24_LE) 245 SNDRV_PCM_FMTBIT_S24_LE)
246 246
247static struct snd_soc_dai_ops wm8728_dai_ops = {
248 .hw_params = wm8728_hw_params,
249 .digital_mute = wm8728_mute,
250 .set_fmt = wm8728_set_dai_fmt,
251};
252
247struct snd_soc_dai wm8728_dai = { 253struct snd_soc_dai wm8728_dai = {
248 .name = "WM8728", 254 .name = "WM8728",
249 .playback = { 255 .playback = {
@@ -253,11 +259,7 @@ struct snd_soc_dai wm8728_dai = {
253 .rates = WM8728_RATES, 259 .rates = WM8728_RATES,
254 .formats = WM8728_FORMATS, 260 .formats = WM8728_FORMATS,
255 }, 261 },
256 .ops = { 262 .ops = &wm8728_dai_ops,
257 .hw_params = wm8728_hw_params,
258 .digital_mute = wm8728_mute,
259 .set_fmt = wm8728_set_dai_fmt,
260 }
261}; 263};
262EXPORT_SYMBOL_GPL(wm8728_dai); 264EXPORT_SYMBOL_GPL(wm8728_dai);
263 265