summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-05-19 10:13:09 +0200
committerJonathan Cameron <jic23@kernel.org>2026-05-31 11:01:46 +0100
commitf68afce8e8a74f52a879f56f607dfedf552b5ab5 (patch)
tree87b2f99b3e0b31a3e23fd48b2a3e6c5a6fe851af /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
parentc4657858d43ada628e2f4eaf591c43efb3649933 (diff)
iio: Initialize i2c_device_id arrays using member names
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. 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: Siratul Islam <email@sirat.me> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions