From 47e039413cacee70229ebbf6de5a8e3b27e6f057 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 23 Jan 2015 16:21:36 +0100 Subject: ASoC: Add support for allocating AC'97 device before registering it In some cases it is necessary to before additional operations after the device has been initialized and before the device is registered. This can for example be resetting the device. This patch introduces a new function snd_soc_alloc_ac97_codec() which is similar to snd_soc_new_ac97_codec() except that it does not register the device. Any users of snd_soc_alloc_ac97_codec() are responsible for calling device_add() manually. Fixes: 6794f709b712 ("ASoC: ac97: Drop delayed device registration") Reported-by: Manuel Lauss Signed-off-by: Lars-Peter Clausen Tested-by: Manuel Lauss Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- include/sound/soc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index b4fca9aed2a2..ac8b333acb4d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -498,6 +498,7 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, unsigned int mask, unsigned int value); #ifdef CONFIG_SND_SOC_AC97_BUS +struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); -- cgit v1.2.3