Skip to contentSkip to conversation

watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load

PATCH In review Raag Jadav 2 participants 2 messages Aug 11, 2023

Subsystems (2)
lore
Share & tools
lore

Raag Jadav

author
#0 lore raw

PATCH 1/1 watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load

When built with CONFIG_INTEL_MID_WATCHDOG=m, currently the driver needs to be loaded manually, for the lack of module alias. This causes unintended resets in cases where watchdog timer is set-up by bootloader and the driver is not explicitly loaded. Add MODULE_ALIAS() to load the driver automatically at boot and avoid this issue.

Fixes 87a1ef8058d9 ("watchdog: add Intel MID watchdog driver support")
---
 drivers/watchdog/intel-mid_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -0
index 9b2173f765c8..fb7fae750181 100644
@@ -203,3 +203,4 @@ module_platform_driver(mid_wdt_driver);
 MODULE_AUTHOR("David Cohen <[email protected]>");
 MODULE_DESCRIPTION("Watchdog Driver for Intel MID platform");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:intel_mid_wdt");
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Raag Jadav

When built with CONFIG_INTEL_MID_WATCHDOG=m, currently the driver needs to be loaded manually, for the lack of module alias. This causes unintended resets in cases where watchdog timer is set-up by bootloader and the driver is not explicitly loaded. Add MODULE_ALIAS() to load the driver automatically at boot and avoid this issue.

Fixes 87a1ef8058d9 ("watchdog: add Intel MID watchdog driver support")
Quoted 13 lines
---
  drivers/watchdog/intel-mid_wdt.c | 1 +
  1 file changed, 1 insertion(+)
drivers/watchdog/intel-mid_wdt.c +1 -0
index 9b2173f765c8..fb7fae750181 100644
@@ -203,3 +203,4 @@ module_platform_driver(mid_wdt_driver);
  MODULE_AUTHOR("David Cohen <[email protected]>");
  MODULE_DESCRIPTION("Watchdog Driver for Intel MID platform");
  MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:intel_mid_wdt");