]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
backlight: Use named initializers for arrays of i2c_device_data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Mon, 18 May 2026 11:12:03 +0000 (13:12 +0200)
committerLee Jones <lee@kernel.org>
Thu, 11 Jun 2026 14:12:12 +0000 (15:12 +0100)
commitb3c8bb2e69979e3aadcbfc5ac53424ecf26a9277
tree17f0a98f18dcaa8bef2fe76e299485f838ad4a0b
parentacea35b567d0f610d533ca661f4106ac12583f78
backlight: Use named initializers for arrays of i2c_device_data

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.

The mentioned robustness is relevant for a planned change to struct
i2c_device_id that replaces .driver_data by an anonymous union.

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>
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Link: https://patch.msgid.link/20260518111203.639603-2-u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 files changed:
drivers/video/backlight/adp8860_bl.c
drivers/video/backlight/adp8870_bl.c
drivers/video/backlight/arcxcnn_bl.c
drivers/video/backlight/aw99706.c
drivers/video/backlight/bd6107.c
drivers/video/backlight/ktz8866.c
drivers/video/backlight/lm3509_bl.c
drivers/video/backlight/lm3630a_bl.c
drivers/video/backlight/lm3639_bl.c
drivers/video/backlight/lp855x_bl.c
drivers/video/backlight/lv5207lp.c
drivers/video/backlight/mp3309c.c