]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rtc: Drop unused assignment of platform_device_id driver data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Thu, 28 May 2026 06:48:10 +0000 (08:48 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 22 Jun 2026 00:22:42 +0000 (02:22 +0200)
The two drivers explicitly set the .driver_data member of struct
platform_device_id to zero without relying on that value. Drop this
unused assignments.

While touching these array unify spacing, usage of commas and use named
initializers for .name.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/9ec7a174605a17dd19c011ee2253de28d09b02bd.1779950275.git.u.kleine-koenig@baylibre.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-cros-ec.c
drivers/rtc/rtc-max8997.c

index e956505a06fb1ca92531f61fb9a9e512da3949cb..f3ecd017e2f7cf1976b72b0e3c312c1a77eaaa64 100644 (file)
@@ -388,8 +388,8 @@ static void cros_ec_rtc_remove(struct platform_device *pdev)
 }
 
 static const struct platform_device_id cros_ec_rtc_id[] = {
-       { DRV_NAME, 0 },
-       {}
+       { .name = DRV_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, cros_ec_rtc_id);
 
index e7618d715bd89323eab69e5fed5060dc4d8e91ff..89203c92e2cd5a959549903f390077d03b5c4334 100644 (file)
@@ -512,8 +512,8 @@ static void max8997_rtc_shutdown(struct platform_device *pdev)
 }
 
 static const struct platform_device_id rtc_id[] = {
-       { "max8997-rtc", 0 },
-       {},
+       { .name = "max8997-rtc" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, rtc_id);