]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: atmel-ecc - Use named initializers for struct i2c_device_id
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Wed, 20 May 2026 07:01:30 +0000 (09:01 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 May 2026 05:55:58 +0000 (13:55 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-ecc.c

index 9660f6426a849b975d70642ee3ea1f323f015b59..0ca02995a1de40582c86878193faeb35e4abc5e2 100644 (file)
@@ -376,8 +376,8 @@ static const struct of_device_id atmel_ecc_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, atmel_ecc_dt_ids);
 
 static const struct i2c_device_id atmel_ecc_id[] = {
-       { "atecc508a" },
-       { "atecc608b" },
+       { .name = "atecc508a" },
+       { .name = "atecc608b" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, atmel_ecc_id);