summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/kyro/fbdev.c
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/kyro/fbdev.c
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/kyro/fbdev.c')
-rw-r--r--drivers/video/fbdev/kyro/fbdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index c8b1dfa456a3..d756b3603fa6 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -645,9 +645,8 @@ static int kyrofb_ioctl(struct fb_info *info,
}
static const struct pci_device_id kyrofb_pci_tbl[] = {
- { PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, }
+ { PCI_DEVICE(PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000) },
+ { }
};
MODULE_DEVICE_TABLE(pci, kyrofb_pci_tbl);