aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-10 16:41:50 -0500
committerMark Brown <broonie@kernel.org>2014-11-18 10:37:58 -0500
commit6794f709b7124ff1e574c4f4c9494418ab56c4b4 (patch)
tree877945bb9094324a473578de317f6da7f3f99f22 /include/sound
parentca005f324ee38308b319c693f40523d959027acf (diff)
ASoC: ac97: Drop delayed device registration
We have all the information and dependencies we need to initialize and register the device available in snd_soc_new_ac97_codec(). So there is no need to delay the device registration until after the card itself as been registered. This makes the code significantly simpler and also makes it possible to use the AC'97 device in the CODECs probe function. The later will be required to be able to convert the AC'97 CODEC drivers to regmap. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 5b4dec693ca5..206cc8d6eefa 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -507,15 +507,7 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
507 struct platform_device *pdev); 507 struct platform_device *pdev);
508 508
509extern struct snd_ac97_bus_ops *soc_ac97_ops; 509extern struct snd_ac97_bus_ops *soc_ac97_ops;
510
511int snd_soc_ac97_register_dai_links(struct snd_soc_card *card);
512#else 510#else
513
514static inline int snd_soc_ac97_register_dai_links(struct snd_soc_card *card)
515{
516 return 0;
517}
518
519static inline int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, 511static inline int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
520 struct platform_device *pdev) 512 struct platform_device *pdev)
521{ 513{
@@ -808,8 +800,6 @@ struct snd_soc_codec {
808 struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ 800 struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
809 unsigned int cache_bypass:1; /* Suppress access to the cache */ 801 unsigned int cache_bypass:1; /* Suppress access to the cache */
810 unsigned int suspended:1; /* Codec is in suspend PM state */ 802 unsigned int suspended:1; /* Codec is in suspend PM state */
811 unsigned int ac97_registered:1; /* Codec has been AC97 registered */
812 unsigned int ac97_created:1; /* Codec has been created by SoC */
813 unsigned int cache_init:1; /* codec cache has been initialized */ 803 unsigned int cache_init:1; /* codec cache has been initialized */
814 u32 cache_sync; /* Cache needs to be synced to hardware */ 804 u32 cache_sync; /* Cache needs to be synced to hardware */
815 805