[PATCH] spi: atcspi200: Remove redundant assignment to .owner
From: xiaopeitux
Date: Thu Feb 19 2026 - 21:46:16 EST
From: Pei Xiao <xiaopei01@xxxxxxxxxx>
The coccicheck tool reports the following warning for this driver:
./spi-atcspi200.c:670:3-8: No need to set .owner here. The core will do it.
The manual assignment of .owner = THIS_MODULE; in the platform_driver
struct is redundant. The platform_driver_register() function, which is
called to register the driver, is a macro that automatically sets the
driver's owner to THIS_MODULE.
The driver core handles this assignment internally, making the explicit
initialization in the struct definition unnecessary. Remove the
unnecessary line.
Signed-off-by: Pei Xiao <xiaopei01@xxxxxxxxxx>
---
drivers/spi/spi-atcspi200.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-atcspi200.c b/drivers/spi/spi-atcspi200.c
index 60a37ff5c6f5..2075058387f3 100644
--- a/drivers/spi/spi-atcspi200.c
+++ b/drivers/spi/spi-atcspi200.c
@@ -667,7 +667,6 @@ static struct platform_driver atcspi_driver = {
.probe = atcspi_probe,
.driver = {
.name = "atcspi200",
- .owner = THIS_MODULE,
.of_match_table = atcspi_of_match,
.pm = pm_sleep_ptr(&atcspi_pm_ops)
}
--
2.25.1