[PATCH 3/4] pwm: th1520: Use module_pwm_platform_driver! macro
Michal Wilczynski
m.wilczynski at samsung.com
Tue Oct 28 05:22:34 PDT 2025
The `pwm_th1520` Rust driver calls C functions from the `PWM` namespace,
triggering `modpost` warnings due to missing namespace import
declarations in its `.modinfo` section.
Fix these warnings and simplify the module declaration by switching from
the generic `kernel::module_platform_driver!` macro to the newly
introduced PWM-specific `kernel::module_pwm_platform_driver!` macro.
The new macro automatically handles the required `imports_ns: ["PWM"]`
declaration.
Signed-off-by: Michal Wilczynski <m.wilczynski at samsung.com>
---
drivers/pwm/pwm_th1520.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs
index 0ad38b78be854ab3c10268fb20763d9962f59c0f..5fb123f5e9c6dc3a8ee9a7a47fa778c23213e957 100644
--- a/drivers/pwm/pwm_th1520.rs
+++ b/drivers/pwm/pwm_th1520.rs
@@ -369,7 +369,7 @@ fn probe(
}
}
-kernel::module_platform_driver! {
+kernel::module_pwm_platform_driver! {
type: Th1520PwmPlatformDriver,
name: "pwm-th1520",
authors: ["Michal Wilczynski <m.wilczynski at samsung.com>"],
--
2.34.1
More information about the linux-riscv
mailing list