]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Bluetooth: btqcomsmd: Fix module autoload
authorJavier Martinez Canillas <javier@osg.samsung.com>
Mon, 2 Jan 2017 13:09:56 +0000 (10:09 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 16 Feb 2017 16:18:27 +0000 (17:18 +0100)
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 drivers/bluetooth/btqcomsmd.ko | grep alias
$

After this patch:

$ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias
alias:          of:N*T*Cqcom,wcnss-btC*
alias:          of:N*T*Cqcom,wcnss-bt

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btqcomsmd.c

index 08c2c93887c1b3e4a38d19272f61850403f8f405..8d4868af9bbd88fff13eb8525dec5310654f54de 100644 (file)
@@ -165,6 +165,7 @@ static const struct of_device_id btqcomsmd_of_match[] = {
        { .compatible = "qcom,wcnss-bt", },
        { },
 };
+MODULE_DEVICE_TABLE(of, btqcomsmd_of_match);
 
 static struct platform_driver btqcomsmd_driver = {
        .probe = btqcomsmd_probe,