* [PATCH] fbdev: Consistently define pci_device_ids using named initializers
@ 2026-04-30 11:16 Uwe Kleine-König (The Capable Hub)
2026-04-30 11:59 ` Helge Deller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-04-30 11:16 UTC (permalink / raw)
To: Helge Deller
Cc: Benjamin Herrenschmidt, Russell King, Andres Salomon,
Antonino Daplas, linux-fbdev, dri-devel, linux-kernel,
linux-arm-kernel, linux-geode, Markus Schneider-Pargmann
... 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@baylibre.com>
---
Hello,
There is no benefit for radeon of the mentioned follow up quest as it
doesn't use pointers in .driver_data. Other drivers benefit from
- { PCI_VDEVICE(TTI, 0x3220), .driver_data = (kernel_ulong_t)&hptiop_itl_ops },
+ { PCI_VDEVICE(TTI, 0x3220), .driver_data_ptr = &hptiop_itl_ops },
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/video/fbdev is fine. If not I
can split per driver.
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(-)
diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c
index 866c1165704e..195dbf4a5142 100644
--- a/drivers/video/fbdev/arkfb.c
+++ b/drivers/video/fbdev/arkfb.c
@@ -1167,8 +1167,8 @@ static const struct dev_pm_ops ark_pci_pm_ops = {
/* List of boards that we are trying to support */
static const struct pci_device_id ark_devices[] = {
- {PCI_DEVICE(0xEDD8, 0xA099)},
- {0, 0, 0, 0, 0, 0, 0}
+ { PCI_DEVICE(0xEDD8, 0xA099) },
+ { }
};
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index f55b4c7609a8..bcb10e66221c 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -180,101 +180,54 @@ static const struct dev_pm_ops aty128_pci_pm_ops = {
/* supported Rage128 chipsets */
static const struct pci_device_id aty128_pci_tbl[] = {
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_MF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M4 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_ML,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M4 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PA,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PB,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PC,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PD,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PH,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PI,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PJ,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PN,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PQ,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PT,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PU,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PW,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SH,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SN,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TT,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TU,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { 0, }
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_LE), .driver_data = rage_M3_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_LF), .driver_data = rage_M3 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_MF), .driver_data = rage_M4 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_ML), .driver_data = rage_M4 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PA), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PB), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PC), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PD), .driver_data = rage_128_pro_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PE), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PF), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PG), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PH), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PI), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PJ), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PK), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PL), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PM), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PN), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PO), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PP), .driver_data = rage_128_pro_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PQ), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PR), .driver_data = rage_128_pro_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PS), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PT), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PU), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PV), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PW), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PX), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RE), .driver_data = rage_128_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RF), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RG), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RK), .driver_data = rage_128_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RL), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SE), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SF), .driver_data = rage_128_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SG), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SH), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SK), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SL), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SM), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SN), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TF), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TL), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TR), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TS), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TT), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TU), .driver_data = rage_128_ultra },
+ { }
};
MODULE_DEVICE_TABLE(pci, aty128_pci_tbl);
diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c
index cb006484831b..adb03489bedf 100644
--- a/drivers/video/fbdev/aty/radeon_base.c
+++ b/drivers/video/fbdev/aty/radeon_base.c
@@ -95,7 +95,7 @@
#define MIN_MAPPED_VRAM (1024*768*1)
#define CHIP_DEF(id, family, flags) \
- { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
+ { PCI_DEVICE(PCI_VENDOR_ID_ATI, id), .driver_data = (flags) | (CHIP_FAMILY_##family) }
static const struct pci_device_id radeonfb_pci_table[] = {
/* Radeon Xpress 200m */
diff --git a/drivers/video/fbdev/carminefb.c b/drivers/video/fbdev/carminefb.c
index bd4bff6a2484..5f13f1cc79d3 100644
--- a/drivers/video/fbdev/carminefb.c
+++ b/drivers/video/fbdev/carminefb.c
@@ -753,9 +753,8 @@ static void carminefb_remove(struct pci_dev *dev)
#define PCI_VENDOR_ID_FUJITU_LIMITED 0x10cf
static struct pci_device_id carmine_devices[] = {
-{
- PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b)},
- {0, 0, 0, 0, 0, 0, 0}
+ { PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b) },
+ { }
};
MODULE_DEVICE_TABLE(pci, carmine_devices);
diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c
index e29217e476ea..2693b5cc053f 100644
--- a/drivers/video/fbdev/cirrusfb.c
+++ b/drivers/video/fbdev/cirrusfb.c
@@ -253,7 +253,7 @@ static const struct cirrusfb_board_info_rec {
#ifdef CONFIG_PCI
#define CHIP(id, btype) \
- { PCI_VENDOR_ID_CIRRUS, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (btype) }
+ { PCI_VDEVICE(CIRRUS, id), .driver_data = (btype) }
static struct pci_device_id cirrusfb_pci_table[] = {
CHIP(PCI_DEVICE_ID_CIRRUS_5436, BT_ALPINE),
diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c
index 2d12f8e96c7e..3daba94c6c13 100644
--- a/drivers/video/fbdev/cyber2000fb.c
+++ b/drivers/video/fbdev/cyber2000fb.c
@@ -1796,16 +1796,22 @@ static int __maybe_unused cyberpro_pci_resume(struct device *dev)
static struct pci_device_id cyberpro_pci_table[] = {
/* Not yet
- * { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682,
- * PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_IGA_1682 },
+ * {
+ * PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_1682),
+ * .driver_data = ID_IGA_1682,
+ * },
*/
- { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_2000 },
- { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2010,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_2010 },
- { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_5000 },
- { 0, }
+ {
+ PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_2000),
+ .driver_data = ID_CYBERPRO_2000,
+ }, {
+ PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_2010),
+ .driver_data = ID_CYBERPRO_2010,
+ }, {
+ PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_5000),
+ .driver_data = ID_CYBERPRO_5000,
+ },
+ { }
};
MODULE_DEVICE_TABLE(pci, cyberpro_pci_table);
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);
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);
diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index e1a4bc7c2318..22774eb1b14c 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -1642,7 +1642,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
int err;
static const struct pci_device_id intel_82437[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82437) },
{ },
};
@@ -2135,35 +2135,23 @@ static void pci_remove_matrox(struct pci_dev* pdev) {
static const struct pci_device_id matroxfb_devices[] = {
#ifdef CONFIG_FB_MATROX_MILLENIUM
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL_2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL_2_AGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MIL) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MIL_2) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MIL_2_AGP) },
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MYS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MYS) },
#endif
#ifdef CONFIG_FB_MATROX_G
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_MM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_AGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_PCI,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, 0x0532,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_AGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G550,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G100_MM) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G100_AGP) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G200_PCI) },
+ { PCI_VDEVICE(MATROX, 0x0532) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G200_AGP) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G400) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G550) },
#endif
- {0, 0,
- 0, 0, 0, 0, 0}
+ { }
};
MODULE_DEVICE_TABLE(pci, matroxfb_devices);
diff --git a/drivers/video/fbdev/neofb.c b/drivers/video/fbdev/neofb.c
index c1cd028b8991..e0b8d4d6ce79 100644
--- a/drivers/video/fbdev/neofb.c
+++ b/drivers/video/fbdev/neofb.c
@@ -2126,34 +2126,25 @@ static void neofb_remove(struct pci_dev *dev)
}
static const struct pci_device_id neofb_devices[] = {
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2070), .driver_data = FB_ACCEL_NEOMAGIC_NM2070 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2090,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2090},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2090), .driver_data = FB_ACCEL_NEOMAGIC_NM2090 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2093,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2093},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2093), .driver_data = FB_ACCEL_NEOMAGIC_NM2093 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2097,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2097},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2097), .driver_data = FB_ACCEL_NEOMAGIC_NM2097 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2160,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2160},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2160), .driver_data = FB_ACCEL_NEOMAGIC_NM2160 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2200},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2200), .driver_data = FB_ACCEL_NEOMAGIC_NM2200 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2230,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2230},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2230), .driver_data = FB_ACCEL_NEOMAGIC_NM2230 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2360,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2360},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2360), .driver_data = FB_ACCEL_NEOMAGIC_NM2360 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2380,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2380},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2380), .driver_data = FB_ACCEL_NEOMAGIC_NM2380 },
- {0, 0, 0, 0, 0, 0, 0}
+ { }
};
MODULE_DEVICE_TABLE(pci, neofb_devices);
diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c
index 72b85f475605..da2d486022e8 100644
--- a/drivers/video/fbdev/nvidia/nvidia.c
+++ b/drivers/video/fbdev/nvidia/nvidia.c
@@ -58,9 +58,12 @@
#define MAX_CURS 32
static const struct pci_device_id nvidiafb_pci_tbl[] = {
- {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
- PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
- { 0, }
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff0000
+ },
+ { }
};
MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl);
diff --git a/drivers/video/fbdev/pm2fb.c b/drivers/video/fbdev/pm2fb.c
index f34429829b7d..412ff249b5c7 100644
--- a/drivers/video/fbdev/pm2fb.c
+++ b/drivers/video/fbdev/pm2fb.c
@@ -1748,13 +1748,10 @@ static void pm2fb_remove(struct pci_dev *pdev)
}
static const struct pci_device_id pm2fb_id_table[] = {
- { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2V,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, }
+ { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_TVP4020) },
+ { PCI_VDEVICE(3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2) },
+ { PCI_VDEVICE(3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2V) },
+ { }
};
static struct pci_driver pm2fb_driver = {
diff --git a/drivers/video/fbdev/pm3fb.c b/drivers/video/fbdev/pm3fb.c
index 6e55e42514d6..6f552ae36219 100644
--- a/drivers/video/fbdev/pm3fb.c
+++ b/drivers/video/fbdev/pm3fb.c
@@ -1486,9 +1486,8 @@ static void pm3fb_remove(struct pci_dev *dev)
}
static const struct pci_device_id pm3fb_id_table[] = {
- { PCI_VENDOR_ID_3DLABS, 0x0a,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, }
+ { PCI_VDEVICE(3DLABS, 0x000a) },
+ { }
};
/* For PCI drivers */
diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
index 3f6384e631b1..06aefad75f46 100644
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -993,9 +993,8 @@ static void pvr2fb_pci_remove(struct pci_dev *pdev)
}
static const struct pci_device_id pvr2fb_pci_tbl[] = {
- { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, },
+ { PCI_VDEVICE(NEC, PCI_DEVICE_ID_NEC_NEON250), },
+ { },
};
MODULE_DEVICE_TABLE(pci, pvr2fb_pci_tbl);
diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c
index 1e377b2ec089..2268fea4d807 100644
--- a/drivers/video/fbdev/riva/fbdev.c
+++ b/drivers/video/fbdev/riva/fbdev.c
@@ -103,92 +103,50 @@ static int rivafb_blank(int blank, struct fb_info *info);
* ------------------------------------------------------------------------- */
static const struct pci_device_id rivafb_pci_tbl[] = {
- { PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UTNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_VTNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UVTNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_ITNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UTNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_VTNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UVTNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_ITNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440) },
// NF2/IGP version, GeForce 4 MX, NV18
- { PCI_VENDOR_ID_NVIDIA, 0x01f0,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_IGEFORCE2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_1,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_DDC,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, } /* terminate list */
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x01f0) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_200) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_IGEFORCE2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_1) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_DDC) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200) },
+ { } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c
index ba30e5568cab..831e9e6861b1 100644
--- a/drivers/video/fbdev/s3fb.c
+++ b/drivers/video/fbdev/s3fb.c
@@ -1563,24 +1563,24 @@ static const struct dev_pm_ops s3_pci_pm_ops = {
/* List of boards that we are trying to support */
static const struct pci_device_id s3_devices[] = {
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8814), .driver_data = CHIP_767_TRIO64UVP},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8901), .driver_data = CHIP_XXX_TRIO64V2_DXGX},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8902), .driver_data = CHIP_551_PLATO_PX},
+ { PCI_VDEVICE(S3, 0x8810), .driver_data = CHIP_XXX_TRIO },
+ { PCI_VDEVICE(S3, 0x8811), .driver_data = CHIP_XXX_TRIO },
+ { PCI_VDEVICE(S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP },
+ { PCI_VDEVICE(S3, 0x8814), .driver_data = CHIP_767_TRIO64UVP },
+ { PCI_VDEVICE(S3, 0x8901), .driver_data = CHIP_XXX_TRIO64V2_DXGX },
+ { PCI_VDEVICE(S3, 0x8902), .driver_data = CHIP_551_PLATO_PX },
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x5631), .driver_data = CHIP_325_VIRGE},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A10), .driver_data = CHIP_357_VIRGE_GX2},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A11), .driver_data = CHIP_359_VIRGE_GX2P},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8904), .driver_data = CHIP_365_TRIO3D},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8C01), .driver_data = CHIP_260_VIRGE_MX},
+ { PCI_VDEVICE(S3, 0x5631), .driver_data = CHIP_325_VIRGE },
+ { PCI_VDEVICE(S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX },
+ { PCI_VDEVICE(S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX },
+ { PCI_VDEVICE(S3, 0x8A10), .driver_data = CHIP_357_VIRGE_GX2 },
+ { PCI_VDEVICE(S3, 0x8A11), .driver_data = CHIP_359_VIRGE_GX2P },
+ { PCI_VDEVICE(S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P },
+ { PCI_VDEVICE(S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X },
+ { PCI_VDEVICE(S3, 0x8904), .driver_data = CHIP_365_TRIO3D },
+ { PCI_VDEVICE(S3, 0x8C01), .driver_data = CHIP_260_VIRGE_MX },
- {0, 0, 0, 0, 0, 0, 0}
+ { }
};
diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c
index c2f79357c8da..7789196d2eb5 100644
--- a/drivers/video/fbdev/savage/savagefb_driver.c
+++ b/drivers/video/fbdev/savage/savagefb_driver.c
@@ -2449,76 +2449,78 @@ static const struct dev_pm_ops savagefb_pm_ops = {
};
static const struct pci_device_id savagefb_devices[] = {
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
+ {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_MX128),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_MX64),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_MX64C),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX128SDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX128DDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX64SDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX64DDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IXCSDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IXCDDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE4),
+ .driver_data = FB_ACCEL_SAVAGE4,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE3D),
+ .driver_data = FB_ACCEL_SAVAGE3D,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE3D_MV),
+ .driver_data = FB_ACCEL_SAVAGE3D_MV,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE2000),
+ .driver_data = FB_ACCEL_SAVAGE2000,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_MX_MV),
+ .driver_data = FB_ACCEL_SAVAGE_MX_MV,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_MX),
+ .driver_data = FB_ACCEL_SAVAGE_MX,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_IX_MV),
+ .driver_data = FB_ACCEL_SAVAGE_IX_MV,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_IX),
+ .driver_data = FB_ACCEL_SAVAGE_IX,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_PM),
+ .driver_data = FB_ACCEL_PROSAVAGE_PM,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_KM),
+ .driver_data = FB_ACCEL_PROSAVAGE_KM,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_S3TWISTER_P),
+ .driver_data = FB_ACCEL_S3TWISTER_P,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_S3TWISTER_K),
+ .driver_data = FB_ACCEL_S3TWISTER_K,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_DDR),
+ .driver_data = FB_ACCEL_PROSAVAGE_DDR,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_DDRK),
+ .driver_data = FB_ACCEL_PROSAVAGE_DDRK,
+ },
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX64,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX64C,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX128SDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX128DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX64SDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX64DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IXCSDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IXCDDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE4,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE4},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE3D,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE3D},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE3D_MV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE3D_MV},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE2000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE2000},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_MX_MV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_MX_MV},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_MX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_MX},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_IX_MV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_IX_MV},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_IX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_IX},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_PM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_PM},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_KM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_KM},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_S3TWISTER_P,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_S3TWISTER_P},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_S3TWISTER_K,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_S3TWISTER_K},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_DDR},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_DDRK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_DDRK},
-
- {0, 0, 0, 0, 0, 0, 0}
+ { }
};
MODULE_DEVICE_TABLE(pci, savagefb_devices);
diff --git a/drivers/video/fbdev/sis/sis_main.h b/drivers/video/fbdev/sis/sis_main.h
index 0965db9fad6a..4ca487f48205 100644
--- a/drivers/video/fbdev/sis/sis_main.h
+++ b/drivers/video/fbdev/sis/sis_main.h
@@ -102,22 +102,22 @@ static struct sisfb_chip_info {
static struct pci_device_id sisfb_pci_table[] = {
#ifdef CONFIG_FB_SIS_300
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_300), .driver_data = 0 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_540_VGA), .driver_data = 1 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_630_VGA), .driver_data = 2 },
#endif
#ifdef CONFIG_FB_SIS_315
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315H, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315PRO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_550_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
- { PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_20, PCI_ANY_ID, PCI_ANY_ID, 0, 0,10},
- { PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_40, PCI_ANY_ID, PCI_ANY_ID, 0, 0,11},
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_315H), .driver_data = 3 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_315), .driver_data = 4 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_315PRO), .driver_data = 5 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_550_VGA), .driver_data = 6 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_650_VGA), .driver_data = 7 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_330), .driver_data = 8 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_660_VGA), .driver_data = 9 },
+ { PCI_VDEVICE(XGI, PCI_DEVICE_ID_XGI_20), .driver_data = 10 },
+ { PCI_VDEVICE(XGI, PCI_DEVICE_ID_XGI_40), .driver_data = 11 },
#endif
- { 0 }
+ { }
};
MODULE_DEVICE_TABLE(pci, sisfb_pci_table);
diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c
index 4c4e53aaea3a..a6b63c09b48f 100644
--- a/drivers/video/fbdev/tdfxfb.c
+++ b/drivers/video/fbdev/tdfxfb.c
@@ -124,16 +124,17 @@ static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);
static void tdfxfb_remove(struct pci_dev *pdev);
static const struct pci_device_id tdfxfb_id_table[] = {
- { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO5,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { 0, }
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE),
+ .class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff0000,
+ }, {
+ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3),
+ .class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff0000,
+ }, {
+ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO5),
+ .class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff0000,
+ },
+ { }
};
static struct pci_driver tdfxfb_driver = {
diff --git a/drivers/video/fbdev/tridentfb.c b/drivers/video/fbdev/tridentfb.c
index 17b7253b8fbe..a8fdbae83a80 100644
--- a/drivers/video/fbdev/tridentfb.c
+++ b/drivers/video/fbdev/tridentfb.c
@@ -1736,28 +1736,28 @@ static void trident_pci_remove(struct pci_dev *dev)
/* List of boards that we are trying to support */
static const struct pci_device_id trident_devices[] = {
- {PCI_VENDOR_ID_TRIDENT, BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi1D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEAi1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEAi1D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEE4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, TGUI9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, TGUI9660, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, IMAGE975, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, IMAGE985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9388, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9520, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9525DVD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9397, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9397DVD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEXPAi1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEXPm8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEXPm16, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {0,}
+ { PCI_VDEVICE(TRIDENT, BLADE3D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi7) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi7D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi1) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi1D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEAi1) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEAi1D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEE4) },
+ { PCI_VDEVICE(TRIDENT, TGUI9440) },
+ { PCI_VDEVICE(TRIDENT, TGUI9660) },
+ { PCI_VDEVICE(TRIDENT, IMAGE975) },
+ { PCI_VDEVICE(TRIDENT, IMAGE985) },
+ { PCI_VDEVICE(TRIDENT, CYBER9320) },
+ { PCI_VDEVICE(TRIDENT, CYBER9388) },
+ { PCI_VDEVICE(TRIDENT, CYBER9520) },
+ { PCI_VDEVICE(TRIDENT, CYBER9525DVD) },
+ { PCI_VDEVICE(TRIDENT, CYBER9397) },
+ { PCI_VDEVICE(TRIDENT, CYBER9397DVD) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEXPAi1) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEXPm8) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEXPm16) },
+ { }
};
MODULE_DEVICE_TABLE(pci, trident_devices);
diff --git a/drivers/video/fbdev/vt8623fb.c b/drivers/video/fbdev/vt8623fb.c
index df984f3a7ff6..9708d968970a 100644
--- a/drivers/video/fbdev/vt8623fb.c
+++ b/drivers/video/fbdev/vt8623fb.c
@@ -900,8 +900,8 @@ static const struct dev_pm_ops vt8623_pci_pm_ops = {
/* List of boards that we are trying to support */
static const struct pci_device_id vt8623_devices[] = {
- {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)},
- {0, 0, 0, 0, 0, 0, 0}
+ { PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122) },
+ { }
};
MODULE_DEVICE_TABLE(pci, vt8623_devices);
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fbdev: Consistently define pci_device_ids using named initializers
2026-04-30 11:16 [PATCH] fbdev: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
@ 2026-04-30 11:59 ` Helge Deller
2026-05-05 0:30 ` Claude review: " Claude Code Review Bot
2026-05-05 0:30 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Helge Deller @ 2026-04-30 11:59 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, Markus Schneider-Pargmann
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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Claude review: fbdev: Consistently define pci_device_ids using named initializers
2026-04-30 11:16 [PATCH] fbdev: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-04-30 11:59 ` Helge Deller
2026-05-05 0:30 ` Claude review: " Claude Code Review Bot
@ 2026-05-05 0:30 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 0:30 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: fbdev: Consistently define pci_device_ids using named initializers
Author: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?=
<u.kleine-koenig@baylibre.com>
Patches: 2
Reviewed: 2026-05-05T10:30:11.568532
---
This is a single, well-motivated mechanical cleanup patch across 21 fbdev drivers. It converts positional `struct pci_device_id` initializers to named initializers using `PCI_DEVICE()` / `PCI_VDEVICE()` helper macros. The stated motivation — preparing for an anonymous union on `driver_data` — is a legitimate kernel-wide effort, and this patch is a reasonable prerequisite since anonymous unions require designated initializers.
The conversions look correct throughout. The patch consistently replaces verbose `{vendor, device, PCI_ANY_ID, PCI_ANY_ID, 0, 0, driver_data}` patterns with readable macro-based forms, and replaces `{0, 0, 0, 0, 0, 0, 0}` terminators with `{ }`. The claim of no binary change to the compiled `pci_device_id` arrays is credible.
**Verdict: Looks good overall, with a couple of minor observations below.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Claude review: fbdev: Consistently define pci_device_ids using named initializers
2026-04-30 11:16 [PATCH] fbdev: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-04-30 11:59 ` Helge Deller
@ 2026-05-05 0:30 ` Claude Code Review Bot
2026-05-05 0:30 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 0:30 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Minor observations (non-blocking):**
1. **nvidia/nvidia.c — `PCI_DEVICE` with `PCI_ANY_ID`**: The conversion is semantically correct:
```c
- {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
- PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff0000
+ },
```
`PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID)` works because PCI matching treats `PCI_ANY_ID` in the device field as a wildcard. However, `PCI_DEVICE_CLASS()` would be a more semantically precise choice here, since this entry really matches by vendor + display class, not by a specific device. That said, `PCI_DEVICE_CLASS` sets vendor to `PCI_ANY_ID` too, so it would change the semantics (broadening the match beyond NVIDIA). The current conversion preserves the original behavior, which is the right call.
2. **riva/fbdev.c — `PCI_DEVICE` instead of `PCI_VDEVICE`**: All riva entries use `PCI_DEVICE(PCI_VENDOR_ID_XXX, ...)` rather than `PCI_VDEVICE(XXX, ...)`. This is because the first entry uses `PCI_VENDOR_ID_NVIDIA_SGS` (a different vendor from the rest), so `PCI_DEVICE` was chosen for uniformity across the table. Reasonable stylistic choice.
3. **pm3fb.c — device ID formatting**:
```c
- { PCI_VENDOR_ID_3DLABS, 0x0a,
+ { PCI_VDEVICE(3DLABS, 0x000a) },
```
The value change from `0x0a` to `0x000a` is cosmetic (same value), but it's a nice touch to normalize to 4-digit hex for consistency with PCI device ID conventions.
4. **sis/sis_main.h — explicit `.driver_data = 0`**: The SIS_300 entry explicitly sets `.driver_data = 0`:
```c
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_300), .driver_data = 0 },
```
This is slightly redundant since `PCI_VDEVICE` already zeros the subsequent fields via its trailing `0, 0`, and the struct is zero-initialized. However, it does improve readability by making the indexing scheme explicit when other entries in the same table use non-zero `driver_data` values (1 through 11). Good call.
5. **matroxfb_base.c — local `PCI_DEVICE` to `PCI_VDEVICE` in stack variable**: The `intel_82437` local array inside `initMatrox2()` is converted:
```c
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82437) },
```
This is correct and equivalent since `driver_data` is unused.
6. **Style consistency**: The patch uses two formatting styles for entries with `driver_data`:
- Single-line: `{ PCI_VDEVICE(ATI, ...), .driver_data = rage_M3 },` (aty128fb, neofb, s3fb)
- Multi-line with `}, {` continuation: `PCI_VDEVICE(...),\n.driver_data = ...,\n}, {` (cyber2000fb, savagefb, tdfxfb)
This isn't an issue — the multi-line form is used when the line would be too long otherwise — but worth noting for consistency if the maintainer has a preference.
7. **Missing trailing comma in nvidia.c**: The last field in the nvidia entry lacks a trailing comma:
```c
+ .class_mask = 0xff0000
+ },
```
While not a bug (it's the last field before the `}`), adding a trailing comma (`.class_mask = 0xff0000,`) is more consistent with kernel style and would make future additions cleaner. The geode/gx1fb_core.c conversion does include the trailing comma by contrast.
**No correctness issues found.** The patch is a clean mechanical transformation that preserves the compiled output. The use of `PCI_VDEVICE` vs `PCI_DEVICE` is appropriate in each case, and the class-match conversions (nvidia, tdfxfb, gx1fb) correctly use named `.class` / `.class_mask` fields.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-05 0:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 11:16 [PATCH] fbdev: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-04-30 11:59 ` Helge Deller
2026-05-05 0:30 ` Claude review: " Claude Code Review Bot
2026-05-05 0:30 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox