summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/geode
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2026-04-30 13:16:36 +0200
committerHelge Deller <deller@gmx.de>2026-06-07 18:25:41 +0200
commite840a232a4a017ff61faedf715083fa1785dfde7 (patch)
treef6f4edc66d4b7b86c05af846442f56e750d54fcc /drivers/video/fbdev/geode
parent608a9fe171a770b62bf34aaa1f4992061c9dcdb3 (diff)
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>
Diffstat (limited to 'drivers/video/fbdev/geode')
-rw-r--r--drivers/video/fbdev/geode/gx1fb_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
index a1919c1934ac..7cca46891aef 100644
--- a/drivers/video/fbdev/geode/gx1fb_core.c
+++ b/drivers/video/fbdev/geode/gx1fb_core.c
@@ -423,10 +423,12 @@ static void __init gx1fb_setup(char *options)
#endif
static struct pci_device_id gx1fb_id_table[] = {
- { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { 0, }
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff0000,
+ },
+ { }
};
MODULE_DEVICE_TABLE(pci, gx1fb_id_table);