]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
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)
committerMark Brown <broonie@kernel.org>
Tue, 3 Oct 2017 16:34:19 +0000 (09:34 -0700)
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>
sound/soc/codecs/msm8916-wcd-analog.c

index f562f2d8690765810821e117f14a26e082ffaa80..3593c578e3e722d3e93a5792141a2f9a399e030d 100644 (file)
@@ -1239,6 +1239,8 @@ static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = {
        { }
 };
 
+MODULE_DEVICE_TABLE(of, pm8916_wcd_analog_spmi_match_table);
+
 static struct platform_driver pm8916_wcd_analog_spmi_driver = {
        .driver = {
                   .name = "qcom,pm8916-wcd-spmi-codec",