ASoC: omap-abe-twl6040: Correct dmic-codec device registration
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 19 Aug 2016 06:34:24 +0000 (09:34 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 19 Aug 2016 14:18:43 +0000 (15:18 +0100)
commit21eb45db282317543ca46c821bbb8d5075e02cbe
tree5008c14c0d19aa7f75f5b8d5bfe23ca3f3f37a07
parent479e2a86dc6aeaec6013165e1bd3525db6914f3a
ASoC: omap-abe-twl6040: Correct dmic-codec device registration

The dmic-codec was registered within the platform_driver's probe function,
which can cause deferred probe to run in loops as reported and analyzed by
Russell King.

Use module_init/exit in the driver and handle the dmic-codec device
registration and removal at that level instead of the platform_driver
probe/remove.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/omap/omap-abe-twl6040.c