diff options
author | Fabio Baltieri <fabio.baltieri@linaro.org> | 2013-05-24 06:39:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-25 15:58:33 -0400 |
commit | 7f92581b21707bfe09e14410283692b658b9ef10 (patch) | |
tree | 90027a82ccfdb6358e01c4c3ea9ac093aadfd20b | |
parent | 6ee0b4b0ef871632b067f216b3032bf8db93c510 (diff) |
ASoC: ab8500-codec: Move codec ops on a separate structure
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 4ca45b9d9625..b8ba0adacfce 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, | |||
2380 | return 0; | 2380 | return 0; |
2381 | } | 2381 | } |
2382 | 2382 | ||
2383 | static const struct snd_soc_dai_ops ab8500_codec_ops = { | ||
2384 | .set_fmt = ab8500_codec_set_dai_fmt, | ||
2385 | .set_tdm_slot = ab8500_codec_set_dai_tdm_slot, | ||
2386 | }; | ||
2387 | |||
2383 | static struct snd_soc_dai_driver ab8500_codec_dai[] = { | 2388 | static struct snd_soc_dai_driver ab8500_codec_dai[] = { |
2384 | { | 2389 | { |
2385 | .name = "ab8500-codec-dai.0", | 2390 | .name = "ab8500-codec-dai.0", |
@@ -2391,12 +2396,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = { | |||
2391 | .rates = AB8500_SUPPORTED_RATE, | 2396 | .rates = AB8500_SUPPORTED_RATE, |
2392 | .formats = AB8500_SUPPORTED_FMT, | 2397 | .formats = AB8500_SUPPORTED_FMT, |
2393 | }, | 2398 | }, |
2394 | .ops = (struct snd_soc_dai_ops[]) { | 2399 | .ops = &ab8500_codec_ops, |
2395 | { | ||
2396 | .set_tdm_slot = ab8500_codec_set_dai_tdm_slot, | ||
2397 | .set_fmt = ab8500_codec_set_dai_fmt, | ||
2398 | } | ||
2399 | }, | ||
2400 | .symmetric_rates = 1 | 2400 | .symmetric_rates = 1 |
2401 | }, | 2401 | }, |
2402 | { | 2402 | { |
@@ -2409,12 +2409,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = { | |||
2409 | .rates = AB8500_SUPPORTED_RATE, | 2409 | .rates = AB8500_SUPPORTED_RATE, |
2410 | .formats = AB8500_SUPPORTED_FMT, | 2410 | .formats = AB8500_SUPPORTED_FMT, |
2411 | }, | 2411 | }, |
2412 | .ops = (struct snd_soc_dai_ops[]) { | 2412 | .ops = &ab8500_codec_ops, |
2413 | { | ||
2414 | .set_tdm_slot = ab8500_codec_set_dai_tdm_slot, | ||
2415 | .set_fmt = ab8500_codec_set_dai_fmt, | ||
2416 | } | ||
2417 | }, | ||
2418 | .symmetric_rates = 1 | 2413 | .symmetric_rates = 1 |
2419 | } | 2414 | } |
2420 | }; | 2415 | }; |