[PATCH] fbdev: Consistently define pci_device_ids using named initializers
Helge Deller
deller at gmx.de
Thu Apr 30 04:59:01 PDT 2026
On 4/30/26 13:16, Uwe Kleine-König (The Capable Hub) wrote:
> ... and PCI device helpers.
>
> The various struct pci_device_id arrays were initialized mostly by list
> expressions. This isn't easily readable if you're not into PCI. Using
> named initializers is more explicit and thus easier to parse. Also use
> PCI_DEVICE* helper macros to assign .vendor, .device, .subvendor and
> .subdevice where appropriate and skip explicit assignments of 0 (which
> the compiler takes care of).
>
> 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@baylibre.com/)
> 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
> array. Tested on x86 and arm64.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig at baylibre.com>
>
> drivers/video/fbdev/arkfb.c | 4 +-
> drivers/video/fbdev/aty/aty128fb.c | 143 +++++++------------
> drivers/video/fbdev/aty/radeon_base.c | 2 +-
> drivers/video/fbdev/carminefb.c | 5 +-
> drivers/video/fbdev/cirrusfb.c | 2 +-
> drivers/video/fbdev/cyber2000fb.c | 24 ++--
> drivers/video/fbdev/geode/gx1fb_core.c | 10 +-
> drivers/video/fbdev/kyro/fbdev.c | 5 +-
> drivers/video/fbdev/matrox/matroxfb_base.c | 38 ++---
> drivers/video/fbdev/neofb.c | 29 ++--
> drivers/video/fbdev/nvidia/nvidia.c | 9 +-
> drivers/video/fbdev/pm2fb.c | 11 +-
> drivers/video/fbdev/pm3fb.c | 5 +-
> drivers/video/fbdev/pvr2fb.c | 5 +-
> drivers/video/fbdev/riva/fbdev.c | 128 ++++++-----------
> drivers/video/fbdev/s3fb.c | 32 ++---
> drivers/video/fbdev/savage/savagefb_driver.c | 140 +++++++++---------
> drivers/video/fbdev/sis/sis_main.h | 26 ++--
> drivers/video/fbdev/tdfxfb.c | 21 +--
> drivers/video/fbdev/tridentfb.c | 44 +++---
> drivers/video/fbdev/vt8623fb.c | 4 +-
> 21 files changed, 292 insertions(+), 395 deletions(-)
applied.
Thanks!
Helge
More information about the linux-arm-kernel
mailing list