Re: [PATCH v1 13/13] staging: iio: Initialize spi_device_id arrays using member names
From: Uwe Kleine-König (The Capable Hub)
Date: Fri Jun 26 2026 - 09:25:00 EST
Hello Jonathan,
On Wed, Jun 24, 2026 at 06:54:19PM +0100, Jonathan Cameron wrote:
> On Fri, 19 Jun 2026 17:54:41 +0200
> Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx> wrote:
>
> > 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
> > spi_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@xxxxxxxxxxxx>
> Applied. So that leaves the pair related to Andy's comment and that ADI IMU for
> a v2.
>
> Thanks for your hard work on this. I merged it fairly quick because
> I know we are going to have some merge conflicts (mostly other folk
> tidying up individual drivers as part of more complex changes)
Thanks for your cooperation and merging it. The combination makes this
worthwhile.
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature