]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
watchdog: ziirave_wdt: Use named initializers for struct i2c_device_id
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Mon, 18 May 2026 17:19:01 +0000 (19:19 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 18 May 2026 22:10:36 +0000 (15:10 -0700)
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20260518171901.904094-2-u.kleine-koenig@baylibre.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/ziirave_wdt.c

index 5c6e3fa001d885991e364860e376892b23b93355..f3bb935c08c2ed0e9be3b2a3e7e5b1313b80e085 100644 (file)
@@ -718,7 +718,7 @@ static void ziirave_wdt_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ziirave_wdt_id[] = {
-       { "rave-wdt" },
+       { .name = "rave-wdt" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ziirave_wdt_id);