* [PATCH next] drm/bochs: Use PCI_DEVICE() macro
@ 2022-09-23 20:42 Jorge Maidana
0 siblings, 0 replies; only message in thread
From: Jorge Maidana @ 2022-09-23 20:42 UTC (permalink / raw)
To: Gerd Hoffmann, Thomas Zimmermann; +Cc: Jorge Maidana, dri-devel, virtualization
Remove never used 'driver_data' assignments along with the enum
'bochs_types' and make use of PCI_DEVICE() to simplify the elements of
bochs_pci_tbl[].
Signed-off-by: Jorge Maidana <jorgem.linux@gmail.com>
---
drivers/gpu/drm/tiny/bochs.c | 31 +++----------------------------
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
index a51262289..e476c4883 100644
--- a/drivers/gpu/drm/tiny/bochs.c
+++ b/drivers/gpu/drm/tiny/bochs.c
@@ -64,12 +64,6 @@ MODULE_PARM_DESC(defy, "default y resolution");
/* ---------------------------------------------------------------------- */
-enum bochs_types {
- BOCHS_QEMU_STDVGA,
- BOCHS_SIMICS,
- BOCHS_UNKNOWN,
-};
-
struct bochs_device {
/* hw */
void __iomem *mmio;
@@ -693,28 +687,9 @@ static void bochs_pci_remove(struct pci_dev *pdev)
}
static const struct pci_device_id bochs_pci_tbl[] = {
- {
- .vendor = 0x1234,
- .device = 0x1111,
- .subvendor = PCI_SUBVENDOR_ID_REDHAT_QUMRANET,
- .subdevice = PCI_SUBDEVICE_ID_QEMU,
- .driver_data = BOCHS_QEMU_STDVGA,
- },
- {
- .vendor = 0x1234,
- .device = 0x1111,
- .subvendor = PCI_ANY_ID,
- .subdevice = PCI_ANY_ID,
- .driver_data = BOCHS_UNKNOWN,
- },
- {
- .vendor = 0x4321,
- .device = 0x1111,
- .subvendor = PCI_ANY_ID,
- .subdevice = PCI_ANY_ID,
- .driver_data = BOCHS_SIMICS,
- },
- { /* end of list */ }
+ { PCI_DEVICE(0x1234, 0x1111) }, /* Bochs, QEMU */
+ { PCI_DEVICE(0x4321, 0x1111) }, /* Simics */
+ { }
};
static struct pci_driver bochs_pci_driver = {
--
2.30.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-24 6:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 20:42 [PATCH next] drm/bochs: Use PCI_DEVICE() macro Jorge Maidana
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.