]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dpll: zl3073x: Use named initializers for struct i2c_device_id
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 19 May 2026 14:27:10 +0000 (16:27 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 May 2026 02:01:36 +0000 (19:01 -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>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20260519142710.1587324-2-u.kleine-koenig@baylibre.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/dpll/zl3073x/i2c.c

index 979df85826abcc3a6fc185639be9b856c472723c..4a23340e29d08df2aa2c6a82d5915cc82973d964 100644 (file)
@@ -26,11 +26,11 @@ static int zl3073x_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id zl3073x_i2c_id[] = {
-       { "zl30731" },
-       { "zl30732" },
-       { "zl30733" },
-       { "zl30734" },
-       { "zl30735" },
+       { .name = "zl30731" },
+       { .name = "zl30732" },
+       { .name = "zl30733" },
+       { .name = "zl30734" },
+       { .name = "zl30735" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, zl3073x_i2c_id);