pwm: pca9685: 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.

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>
Link: https://patch.msgid.link/20260518172323.932774-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
This commit is contained in:
Uwe Kleine-König (The Capable Hub) 2026-05-18 19:23:22 +02:00 committed by Uwe Kleine-König
parent 74bca0f2d3
commit ff558108c0

View File

@ -538,7 +538,7 @@ static int __maybe_unused pca9685_pwm_runtime_resume(struct device *dev)
}
static const struct i2c_device_id pca9685_id[] = {
{ "pca9685" },
{ .name = "pca9685" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, pca9685_id);