]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fbdev: matroxfb/ssd1307fb: Use named initializers for struct i2c_device_id
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 18 May 2026 16:08:08 +0000 (18:08 +0200)
committerHelge Deller <deller@gmx.de>
Sun, 7 Jun 2026 16:25:41 +0000 (18:25 +0200)
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.

While touching all these arrays, unify usage of whitespace in the list
terminator.

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>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/matrox/matroxfb_maven.c
drivers/video/fbdev/ssd1307fb.c

index 2ea65da6075ca0c48e682e9730eba185650df341..fe057a0b57ec7ee59c6efa49d0c978c4cc963e07 100644 (file)
@@ -1282,7 +1282,7 @@ static void maven_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id maven_id[] = {
-       { "maven" },
+       { .name = "maven" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, maven_id);
index 83dd31fa1fab538fce31c49f6658dd85dc361c9c..644b8d97b381183cbcd35344025598ca9ac97c25 100644 (file)
@@ -784,10 +784,10 @@ static void ssd1307fb_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ssd1307fb_i2c_id[] = {
-       { "ssd1305fb" },
-       { "ssd1306fb" },
-       { "ssd1307fb" },
-       { "ssd1309fb" },
+       { .name = "ssd1305fb" },
+       { .name = "ssd1306fb" },
+       { .name = "ssd1307fb" },
+       { .name = "ssd1309fb" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id);