From 9075ceeadac3e4e4fd906cd84f1ec537442c59be Mon Sep 17 00:00:00 2001 From: Michal Wilczynski Date: Tue, 28 Oct 2025 13:22:34 +0100 Subject: [PATCH] pwm: th1520: Use module_pwm_platform_driver! macro MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Troy Mitchell Reviewed-by: Elle Rhumsaa Link: https://patch.msgid.link/20251028-pwm_fixes-v1-3-25a532d31998@samsung.com Signed-off-by: Uwe Kleine-König --- 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 b2d83c121c5c..955c359b07fb 100644 --- a/drivers/pwm/pwm_th1520.rs +++ b/drivers/pwm/pwm_th1520.rs @@ -378,7 +378,7 @@ impl platform::Driver for Th1520PwmPlatformDriver { } } -kernel::module_platform_driver! { +kernel::module_pwm_platform_driver! { type: Th1520PwmPlatformDriver, name: "pwm-th1520", authors: ["Michal Wilczynski "], -- 2.47.3