]> git.ipfire.org Git - thirdparty/linux.git/commit
fbdev: Consistently define pci_device_ids using named initializers
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Thu, 30 Apr 2026 11:16:36 +0000 (13:16 +0200)
committerHelge Deller <deller@gmx.de>
Sun, 7 Jun 2026 16:25:41 +0000 (18:25 +0200)
commite840a232a4a017ff61faedf715083fa1785dfde7
treef6f4edc66d4b7b86c05af846442f56e750d54fcc
parent608a9fe171a770b62bf34aaa1f4992061c9dcdb3
fbdev: Consistently define pci_device_ids using named initializers

... 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.

While touching all these arrays, unify usage of whitespace and comma
in a few drivers.

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@baylibre.com>
Signed-off-by: Helge Deller <deller@gmx.de>
21 files changed:
drivers/video/fbdev/arkfb.c
drivers/video/fbdev/aty/aty128fb.c
drivers/video/fbdev/aty/radeon_base.c
drivers/video/fbdev/carminefb.c
drivers/video/fbdev/cirrusfb.c
drivers/video/fbdev/cyber2000fb.c
drivers/video/fbdev/geode/gx1fb_core.c
drivers/video/fbdev/kyro/fbdev.c
drivers/video/fbdev/matrox/matroxfb_base.c
drivers/video/fbdev/neofb.c
drivers/video/fbdev/nvidia/nvidia.c
drivers/video/fbdev/pm2fb.c
drivers/video/fbdev/pm3fb.c
drivers/video/fbdev/pvr2fb.c
drivers/video/fbdev/riva/fbdev.c
drivers/video/fbdev/s3fb.c
drivers/video/fbdev/savage/savagefb_driver.c
drivers/video/fbdev/sis/sis_main.h
drivers/video/fbdev/tdfxfb.c
drivers/video/fbdev/tridentfb.c
drivers/video/fbdev/vt8623fb.c