Skip to contentSkip to conversation

bus: arm-ccn: Fix module autoload

PATCH In review Javier Martinez Canillas 2 participants 5 messages Jan 2, 2017 – Feb 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bus: arm-ccn: 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/bus/arm-ccn.ko | grep alias
$

After this patch:

$ modinfo drivers/bus/arm-ccn.ko | grep alias
alias:          of:N*T*Carm,ccn-504C*
alias:          of:N*T*Carm,ccn-504

---

 drivers/bus/arm-ccn.c | 1 +
 1 file changed, 1 insertion(+)
drivers/bus/arm-ccn.c +1 -0
index 4d6a2b7e4d3f..80758f6fdaa5 100644
@@ -1547,6 +1547,7 @@ static const struct of_device_id arm_ccn_match[] = {
 	{ .compatible = "arm,ccn-504", },
 	{},
 };
+MODULE_DEVICE_TABLE(of, arm_ccn_match);
 
 static struct platform_driver arm_ccn_driver = {
 	.driver = {
Signature · 1 line
2.7.4
#1 lore raw

Hello,

Quoted 11 lines · Javier Martinez Canillas

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/bus/arm-ccn.ko | grep alias
$
Quoted 8 lines

After this patch:

$ modinfo drivers/bus/arm-ccn.ko | grep alias
alias:          of:N*T*Carm,ccn-504C*
alias:          of:N*T*Carm,ccn-504

---

Any comments about this patch?

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
#2 lore raw
Quoted 16 lines · Javier Martinez Canillas
Quoted 15 lines · Javier Martinez Canillas

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/bus/arm-ccn.ko | grep alias
$

After this patch:

Quoted 7 lines
Quoted 6 lines
$ modinfo drivers/bus/arm-ccn.ko | grep alias
alias:          of:N*T*Carm,ccn-504C*
alias:          of:N*T*Carm,ccn-504

---

Any comments about this patch?

Sorry, I clearly missed that in my mailbox at the beginning of the year.

It all makes sense to me. I'll try to test it out soon and will make sure to include it next time I send out CCN update.

Thanks!

Paweł
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#3 lore raw
In reply to Javier Martinez Canillas
Quoted 16 lines · Javier Martinez Canillas
Quoted 15 lines · Javier Martinez Canillas

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/bus/arm-ccn.ko | grep alias
$

After this patch:

Quoted 7 lines
Quoted 6 lines
$ modinfo drivers/bus/arm-ccn.ko | grep alias
alias:          of:N*T*Carm,ccn-504C*
alias:          of:N*T*Carm,ccn-504

---

Any comments about this patch?

Sorry, I clearly missed that in my mailbox at the beginning of the year.

It all makes sense to me. I'll try to test it out soon and will make sure to include it next time I send out CCN update.

Thanks!

Paweł

#4 lore raw

Hello Pawel,

Quoted 23 lines · Pawel Moll
Quoted 22 lines · Javier Martinez Canillas
Quoted 21 lines · Javier Martinez Canillas

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/bus/arm-ccn.ko | grep alias
$

After this patch:

$ modinfo drivers/bus/arm-ccn.ko | grep alias
alias:          of:N*T*Carm,ccn-504C*
alias:          of:N*T*Carm,ccn-504

---

Quoted 8 lines
Quoted 1 line

Any comments about this patch?

Sorry, I clearly missed that in my mailbox at the beginning of the year.

It all makes sense to me. I'll try to test it out soon and will make sure to include it next time I send out CCN update.

Ok, thanks a lot!

Quoted 4 lines

Thanks!

Paweł

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America