linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] watchdog: bcm7038_wdt: fix module autoload
@ 2016-10-14 15:23 Javier Martinez Canillas
  2016-10-14 15:23 ` [PATCH 2/2] watchdog: max77620_wdt: " Javier Martinez Canillas
  2016-10-14 16:55 ` [PATCH 1/2] watchdog: bcm7038_wdt: " Guenter Roeck
  0 siblings, 2 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2016-10-14 15:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Guenter Roeck, linux-watchdog,
	Wim Van Sebroeck

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/watchdog/bcm7038_wdt.ko | grep alias
$

After this patch:

$ modinfo drivers/watchdog/bcm7038_wdt.ko | grep alias
alias:          of:N*T*Cbrcm,bcm7038-wdtC*
alias:          of:N*T*Cbrcm,bcm7038-wdt

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/watchdog/bcm7038_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/bcm7038_wdt.c b/drivers/watchdog/bcm7038_wdt.c
index e238df4d75a2..4814c00b32f6 100644
--- a/drivers/watchdog/bcm7038_wdt.c
+++ b/drivers/watchdog/bcm7038_wdt.c
@@ -216,6 +216,7 @@ static const struct of_device_id bcm7038_wdt_match[] = {
 	{ .compatible = "brcm,bcm7038-wdt" },
 	{},
 };
+MODULE_DEVICE_TABLE(of, bcm7038_wdt_match);
 
 static struct platform_driver bcm7038_wdt_driver = {
 	.probe		= bcm7038_wdt_probe,
-- 
2.7.4

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

end of thread, other threads:[~2016-11-11 21:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-14 15:23 [PATCH 1/2] watchdog: bcm7038_wdt: fix module autoload Javier Martinez Canillas
2016-10-14 15:23 ` [PATCH 2/2] watchdog: max77620_wdt: " Javier Martinez Canillas
2016-10-14 16:56   ` Guenter Roeck
2016-10-14 16:55 ` [PATCH 1/2] watchdog: bcm7038_wdt: " Guenter Roeck
2016-11-11 19:43   ` Javier Martinez Canillas
2016-11-11 19:47     ` Guenter Roeck
2016-11-11 21:02       ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).