All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btqcomsmd: Fix module autoload
@ 2017-01-02 13:09 Javier Martinez Canillas
  2017-02-03 21:34 ` Javier Martinez Canillas
  2017-02-16 16:19 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2017-01-02 13:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Johan Hedberg, Marcel Holtmann,
	Gustavo Padovan, linux-bluetooth

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

 drivers/bluetooth/btqcomsmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c
index 08c2c93887c1..8d4868af9bbd 100644
--- a/drivers/bluetooth/btqcomsmd.c
+++ b/drivers/bluetooth/btqcomsmd.c
@@ -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,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btqcomsmd: Fix module autoload
  2017-01-02 13:09 [PATCH] Bluetooth: btqcomsmd: Fix module autoload Javier Martinez Canillas
@ 2017-02-03 21:34 ` Javier Martinez Canillas
  2017-02-16 16:19 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2017-02-03 21:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: Johan Hedberg, Marcel Holtmann, Gustavo Padovan, linux-bluetooth

Hello,

On 01/02/2017 10:09 AM, Javier Martinez Canillas wrote:
> 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>
> ---

Any comments about this patch?

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btqcomsmd: Fix module autoload
  2017-01-02 13:09 [PATCH] Bluetooth: btqcomsmd: Fix module autoload Javier Martinez Canillas
  2017-02-03 21:34 ` Javier Martinez Canillas
@ 2017-02-16 16:19 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2017-02-16 16:19 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Johan Hedberg, Gustavo F. Padovan, linux-bluetooth

Hi Javier,

> 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>
> ---
> 
> drivers/bluetooth/btqcomsmd.c | 1 +
> 1 file changed, 1 insertion(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-16 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 13:09 [PATCH] Bluetooth: btqcomsmd: Fix module autoload Javier Martinez Canillas
2017-02-03 21:34 ` Javier Martinez Canillas
2017-02-16 16:19 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.