summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2026-05-18 18:08:08 +0200
committerHelge Deller <deller@gmx.de>2026-06-07 18:25:41 +0200
commit608a9fe171a770b62bf34aaa1f4992061c9dcdb3 (patch)
tree72433f479cf9534b8b7a7c5b8a3314d0da4eeaba /drivers/video/fbdev
parente38b27199e0f5b530fd2b033e3b63241a0b16596 (diff)
downloadlwn-608a9fe171a770b62bf34aaa1f4992061c9dcdb3.tar.gz
lwn-608a9fe171a770b62bf34aaa1f4992061c9dcdb3.zip
fbdev: matroxfb/ssd1307fb: Use named initializers for struct i2c_device_id
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>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/matrox/matroxfb_maven.c2
-rw-r--r--drivers/video/fbdev/ssd1307fb.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/fbdev/matrox/matroxfb_maven.c b/drivers/video/fbdev/matrox/matroxfb_maven.c
index 2ea65da6075c..fe057a0b57ec 100644
--- a/drivers/video/fbdev/matrox/matroxfb_maven.c
+++ b/drivers/video/fbdev/matrox/matroxfb_maven.c
@@ -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);
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 83dd31fa1fab..644b8d97b381 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -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);