drivers/tty/serial/jsm/jsm_driver.c | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-)
The driver doesn't use the driver_data field, so drop the assigment
together with the then redundant zero assigment for .class and
.class_mask. Also drop the zero in the list terminator.
While at it also use PCI_VDEVICE() to allow dropping "PCI_VENDOR_ID_".
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,
(implicit) v1 is available at
https://lore.kernel.org/linux-serial/20260505073044.2258674-2-u.kleine-koenig@baylibre.com
.
In the v1 discussion I mentioned that I don't spot a usage of
.driver_data and Jiri confirmed these are unused. So this v2 just drops
the respective assignments and thus circumvents the subjective
discussion if my v1 really made the array better readable. Also the
usage of PCI_VDEVICE() is new.
Best regards
Uwe
drivers/tty/serial/jsm/jsm_driver.c | 38 ++++++++++++++---------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c
index 4b73e51f83fb..8cd9b981bf20 100644
--- a/drivers/tty/serial/jsm/jsm_driver.c
+++ b/drivers/tty/serial/jsm/jsm_driver.c
@@ -296,25 +296,25 @@ static void jsm_remove_one(struct pci_dev *pdev)
}
static const struct pci_device_id jsm_pci_tbl[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9), 0, 0, 0 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9PRI), 0, 0, 1 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45), 0, 0, 2 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4_IBM), 0, 0, 4 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_NEO_8), 0, 0, 5 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_4), 0, 0, 6 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422), 0, 0, 7 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_1_422_485), 0, 0, 8 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2_422_485), 0, 0, 9 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8), 0, 0, 10 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4), 0, 0, 11 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4RJ45), 0, 0, 12 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_8RJ45), 0, 0, 13 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_CLASSIC_4), 0, 0, 14 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_CLASSIC_4_422), 0, 0, 15 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_CLASSIC_8), 0, 0, 16 },
- { PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_CLASSIC_8_422), 0, 0, 17 },
- { 0, }
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_2DB9) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_2DB9PRI) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_2RJ45) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI) },
+ { PCI_VDEVICE(DIGI, PCIE_DEVICE_ID_NEO_4_IBM) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_NEO_8) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_4) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_1_422) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_1_422_485) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_NEO_2_422_485) },
+ { PCI_VDEVICE(DIGI, PCIE_DEVICE_ID_NEO_8) },
+ { PCI_VDEVICE(DIGI, PCIE_DEVICE_ID_NEO_4) },
+ { PCI_VDEVICE(DIGI, PCIE_DEVICE_ID_NEO_4RJ45) },
+ { PCI_VDEVICE(DIGI, PCIE_DEVICE_ID_NEO_8RJ45) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_CLASSIC_4) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_CLASSIC_4_422) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_CLASSIC_8) },
+ { PCI_VDEVICE(DIGI, PCI_DEVICE_ID_CLASSIC_8_422) },
+ { }
};
MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3
© 2016 - 2026 Red Hat, Inc.