kernel-fxtec-pro1x/sound/soc/kirkwood
Russell King 80e28fa256 ASoC: kirkwood: fix device remove ordering
[ Upstream commit dc39596a906d5b604f4e64597b6e904fc14625e8 ]

The devm conversion of kirkwood was incorrect; on removal, devm takes
effect after the "remove" function has returned.  So, the effect of
the conversion was to change the order during remove from:

  - snd_soc_unregister_component() (unpublishes interfaces)
  - clk_disable_unprepare()
  - cleanup resources

After the conversion, this became:

  - clk_disable_unprepare() - while the device may still be active
  - snd_soc_unregister_component()
  - cleanup resources

Hence, it introduces a bug, where the internal clock for the device
may be shut down before the device itself has been shut down.  It is
known that Marvell SoCs, including Dove, locks up if registers for a
peripheral that has its clocks disabled are accessed.

Fixes: f98fc0f815 ("ASoC: kirkwood: replace platform to component")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1iNGyP-0004oN-BA@rmk-PC.armlinux.org.uk
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-05 09:19:37 +01:00
..
armada-370-db.c ASoC: constify snd_soc_ops structures 2016-10-24 18:34:55 +01:00
Kconfig ASoC: Remove depends on HAS_DMA in case of platform dependency 2018-04-18 11:17:09 +01:00
kirkwood-dma.c ASoC: kirkwood: replace platform to component 2018-02-12 11:45:28 +00:00
kirkwood-i2s.c ASoC: kirkwood: fix device remove ordering 2019-12-05 09:19:37 +01:00
kirkwood.h ASoC: kirkwood: replace platform to component 2018-02-12 11:45:28 +00:00
Makefile ASoC: kirkwood: Remove unused drivers 2014-07-29 20:34:37 +01:00