From: Fabio Baltieri <fabio.baltieri@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Lee Jones <lee.jones@linaro.org>,
Ola Lilja <ola.o.lilja@stericsson.com>,
Fabio Baltieri <fabio.baltieri@linaro.org>
Subject: [PATCH 2/6] ASoC: ab8500-codec: Move codec ops on a separate structure
Date: Fri, 24 May 2013 12:39:16 +0200 [thread overview]
Message-ID: <1369391960-27320-3-git-send-email-fabio.baltieri@linaro.org> (raw)
In-Reply-To: <1369391960-27320-1-git-send-email-fabio.baltieri@linaro.org>
Define ab8500 codec operations structure on its own rather than inline
with snd_soc_dai_drivers to clean up the code and make the style
coherent with other codec drivers.
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
sound/soc/codecs/ab8500-codec.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 4ca45b9..b8ba0ad 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2380,6 +2380,11 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai,
return 0;
}
+static const struct snd_soc_dai_ops ab8500_codec_ops = {
+ .set_fmt = ab8500_codec_set_dai_fmt,
+ .set_tdm_slot = ab8500_codec_set_dai_tdm_slot,
+};
+
static struct snd_soc_dai_driver ab8500_codec_dai[] = {
{
.name = "ab8500-codec-dai.0",
@@ -2391,12 +2396,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = {
.rates = AB8500_SUPPORTED_RATE,
.formats = AB8500_SUPPORTED_FMT,
},
- .ops = (struct snd_soc_dai_ops[]) {
- {
- .set_tdm_slot = ab8500_codec_set_dai_tdm_slot,
- .set_fmt = ab8500_codec_set_dai_fmt,
- }
- },
+ .ops = &ab8500_codec_ops,
.symmetric_rates = 1
},
{
@@ -2409,12 +2409,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = {
.rates = AB8500_SUPPORTED_RATE,
.formats = AB8500_SUPPORTED_FMT,
},
- .ops = (struct snd_soc_dai_ops[]) {
- {
- .set_tdm_slot = ab8500_codec_set_dai_tdm_slot,
- .set_fmt = ab8500_codec_set_dai_fmt,
- }
- },
+ .ops = &ab8500_codec_ops,
.symmetric_rates = 1
}
};
--
1.8.2
next prev parent reply other threads:[~2013-05-24 10:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 10:39 [PATCH 0/6] More code cleanup for ASoC ux500 Fabio Baltieri
2013-05-24 10:39 ` [PATCH 1/6] ASoC: ux500: Drop pinctrl sleep support Fabio Baltieri
2013-05-24 11:11 ` Linus Walleij
2013-05-25 19:59 ` Mark Brown
2013-05-24 10:39 ` Fabio Baltieri [this message]
2013-05-25 19:59 ` [PATCH 2/6] ASoC: ab8500-codec: Move codec ops on a separate structure Mark Brown
2013-05-24 10:39 ` [PATCH 3/6] ASoC: ux500: Drop dangling struct i2s_controller Fabio Baltieri
2013-05-24 10:39 ` [PATCH 4/6] ASoC: ux500: Drop unused code from msp headers Fabio Baltieri
2013-05-24 10:39 ` [PATCH 5/6] ASoC: ux500: Add missing mop500_ab8500.h include Fabio Baltieri
2013-05-24 10:39 ` [PATCH 6/6] ASoC: ux500: Drop redundant msp id enumerations Fabio Baltieri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369391960-27320-3-git-send-email-fabio.baltieri@linaro.org \
--to=fabio.baltieri@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ola.o.lilja@stericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®