]> git.ipfire.org Git - thirdparty/linux.git/commit
tty: serial: 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 10:14:56 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2026 09:46:29 +0000 (11:46 +0200)
commitcd8e495713de3881658560aa1603bc5cc87994ed
treebf336b5b697f5c46274c71bf0f0ac182a6768a3e
parent01569a29af76aec748b77e0629bcb5615c25468b
tty: serial: 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>
Link: https://patch.msgid.link/20260518101456.632410-2-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c
drivers/tty/serial/sc16is7xx_i2c.c