Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: th1520: Use module_pwm_platform_driver! macro

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@samsung.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
Reviewed-by: Elle Rhumsaa <elle@weathered-steel.dev>
Link: https://patch.msgid.link/20251028-pwm_fixes-v1-3-25a532d31998@samsung.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Michal Wilczynski and committed by
Uwe Kleine-König
9075ceea 26dcb420

+1 -1
+1 -1
drivers/pwm/pwm_th1520.rs
··· 378 378 } 379 379 } 380 380 381 - kernel::module_platform_driver! { 381 + kernel::module_pwm_platform_driver! { 382 382 type: Th1520PwmPlatformDriver, 383 383 name: "pwm-th1520", 384 384 authors: ["Michal Wilczynski <m.wilczynski@samsung.com>"],