]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86: x86-android-tablets: Use named initializers for struct i2c_device_id
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 19 May 2026 15:40:40 +0000 (17:40 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 28 May 2026 11:43:52 +0000 (14:43 +0300)
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 array, only its 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://patch.msgid.link/20260519154040.1594878-2-u.kleine-koenig@baylibre.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c

index ebbedfe5f4e88bcbb514d74df231f2d31eee5208..67dba9aa51f66a7ddb5b1579480145bc2726a924 100644 (file)
@@ -242,7 +242,7 @@ static int atla10_ec_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id atla10_ec_id_table[] = {
-       { "vexia_atla10_ec" },
+       { .name = "vexia_atla10_ec" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, atla10_ec_id_table);