Bluetooth: btqcomsmd: Fix module autoload

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>
This commit is contained in:
Javier Martinez Canillas 2017-01-02 10:09:56 -03:00 committed by Marcel Holtmann
parent a57bac4346
commit 747d3f1a8a
1 changed files with 1 additions and 0 deletions

View 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,