Re: [PATCH] mfd: Consistently define pci_device_ids using named initializers

From: Uwe Kleine-König (The Capable Hub)

Date: Wed Apr 29 2026 - 17:25:56 EST


Hello,

On Wed, Apr 29, 2026 at 07:06:51PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> The various struct pci_device_id arrays were initialized mostly by one
> of the PCI_DEVICE macros and then list expressions. The latter isn't
> easily readable if you're not into PCI. Using named initializers is more
> explicit and thus easier to parse.
>
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@xxxxxxxxxxxx/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
>
> This change doesn't introduce changes to the compiled pci_device_id
> arrays. Tested on x86 and arm64.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
> ---
> Hello,
>
> the mentioned follow-up quest allows to do
>
> - { PCI_VDEVICE(INTEL, 0x02a8), .driver_data = (kernel_ulong_t)&spt_uart_info },
> + { PCI_VDEVICE(INTEL, 0x02a8), .driver_data_ptr = &spt_uart_info },
>
> which gets rid of a bunch of casts and so brings a little bit more type
> safety. This patch is a preparation for that.
>
> I assume a single patch for all of drivers/mfc is fine. If not I can
> split per driver.

Oh, it seems I got my mailtracking wrong and sent this patch twice with
only slightly changed commit log. The commit log of this one is slightly
better, but if you pick the other one that's fine, too.

Sorry for the confusion,
Uwe

Attachment: signature.asc
Description: PGP signature