ASoC: codecs: msm8916-wcd-analog: fix module autoload
authorNicolas Dechesne <nicolas.dechesne@linaro.org>
Tue, 3 Oct 2017 09:49:51 +0000 (11:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:28 +0000 (14:26 +0100)
commitc01b06d9ac357e1d6d95d7b62be60ecd69071c2b
treeb4fd03a07e54f60a12cacfb1d0eafdf0f7aa914c
parent5d1b6695edb773d27f100eafc8cc9a34c58cb07f
ASoC: codecs: msm8916-wcd-analog: fix module autoload

[ Upstream commit 46d69e141d479585c105a4d5b2337cd2ce6967e5 ]

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo snd_soc_msm8916_analog | grep alias
$

After this patch:

$ modinfo snd_soc_msm8916_analog | grep alias
alias:          of:N*T*Cqcom,pm8916-wcd-analog-codecC*
alias:          of:N*T*Cqcom,pm8916-wcd-analog-codec

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/msm8916-wcd-analog.c