Re: [PATCH v4 13/23] gpio: Use named initializers for auxiliary_device_id arrays
From: Sakari Ailus
Date: Tue Oct 27 2026 - 07:07:16 EST
Hi Uwe,
On Tue, Oct 27, 2026 at 11:48:50AM +0100, Uwe Kleine-König (The Capable Hub) 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
> auxiliary_device_id that replaces .driver_data by an anonymous union
> (though none of these drivers uses .driver_data, so this patch isn't
> strictly necessary for the plan, but still ok for consistency).
>
> This patch doesn't modify the compiled arrays, only their representation
> in source form benefits.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> # gpio-usbio, gpio-ljca
--
Regards,
Sakari Ailus