]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rtc: Use named initializers for arrays of i2c_device_data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Fri, 15 May 2026 15:47:20 +0000 (17:47 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 22 Jun 2026 00:20:13 +0000 (02:20 +0200)
commit3eebec1cb5dc1abd9d0b6a97a752800bf1a4e035
treee7c034c545fd9fbc8efef94d1e063a7684fbfd17
parenta091e1ba3b68cabc9caedafc6f81d9fe9b3b2200
rtc: 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 and commas.

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: Tóth János <gomba007@gmail.com>
Link: https://patch.msgid.link/20260515154720.406128-2-u.kleine-koenig@baylibre.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
34 files changed:
drivers/rtc/rtc-ab-b5ze-s3.c
drivers/rtc/rtc-ab-eoz9.c
drivers/rtc/rtc-abx80x.c
drivers/rtc/rtc-bq32k.c
drivers/rtc/rtc-ds1307.c
drivers/rtc/rtc-ds1374.c
drivers/rtc/rtc-ds1672.c
drivers/rtc/rtc-ds3232.c
drivers/rtc/rtc-em3027.c
drivers/rtc/rtc-fm3130.c
drivers/rtc/rtc-hym8563.c
drivers/rtc/rtc-isl12022.c
drivers/rtc/rtc-isl12026.c
drivers/rtc/rtc-isl1208.c
drivers/rtc/rtc-m41t80.c
drivers/rtc/rtc-max31335.c
drivers/rtc/rtc-max6900.c
drivers/rtc/rtc-nct3018y.c
drivers/rtc/rtc-pcf2127.c
drivers/rtc/rtc-pcf85063.c
drivers/rtc/rtc-pcf8523.c
drivers/rtc/rtc-pcf8563.c
drivers/rtc/rtc-pcf8583.c
drivers/rtc/rtc-rs5c372.c
drivers/rtc/rtc-rv3029c2.c
drivers/rtc/rtc-rv8803.c
drivers/rtc/rtc-rx6110.c
drivers/rtc/rtc-rx8010.c
drivers/rtc/rtc-rx8025.c
drivers/rtc/rtc-rx8581.c
drivers/rtc/rtc-s35390a.c
drivers/rtc/rtc-sd2405al.c
drivers/rtc/rtc-sd3078.c
drivers/rtc/rtc-x1205.c