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>
}
static const struct i2c_device_id maven_id[] = {
- { "maven" },
+ { .name = "maven" },
{ }
};
MODULE_DEVICE_TABLE(i2c, maven_id);
}
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);