mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 02:53:16 -04:00
gpib: Initialize pci_device_ids using PCI_DEVICE macros
The PCI_DEVICE macro and its variants allow to initialize the first four members of a struct pci_device_id in a bit more compact form and also with an easier to grasp semantic. Explicit zeros are not needed, the compiler fills these in automatically. So convert all array members to such a macro and drop unneeded zeros. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20260629165426.3330888-2-u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9d4ce1c7cd
commit
fbf64f3595
@@ -839,11 +839,10 @@ static int agilent_82350b_pci_probe(struct pci_dev *dev, const struct pci_device
|
||||
}
|
||||
|
||||
static const struct pci_device_id agilent_82350b_pci_table[] = {
|
||||
{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_HP,
|
||||
PCI_SUBDEVICE_ID_82350A, 0, 0, 0 },
|
||||
{ PCI_VENDOR_ID_AGILENT, PCI_DEVICE_ID_82350B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
|
||||
{ PCI_VENDOR_ID_AGILENT, PCI_DEVICE_ID_82351A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
|
||||
{ 0 }
|
||||
{ PCI_VDEVICE_SUB(PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_HP, PCI_SUBDEVICE_ID_82350A) },
|
||||
{ PCI_VDEVICE(AGILENT, PCI_DEVICE_ID_82350B) },
|
||||
{ PCI_VDEVICE(AGILENT, PCI_DEVICE_ID_82351A) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, agilent_82350b_pci_table);
|
||||
|
||||
|
||||
@@ -1093,10 +1093,10 @@ static int cb7210_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
}
|
||||
|
||||
static const struct pci_device_id cb7210_pci_table[] = {
|
||||
{PCI_VENDOR_ID_CBOARDS, PCI_DEVICE_ID_CBOARDS_PCI_GPIB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
|
||||
{PCI_VENDOR_ID_CBOARDS, PCI_DEVICE_ID_CBOARDS_CPCI_GPIB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
|
||||
{PCI_VENDOR_ID_QUANCOM, PCI_DEVICE_ID_QUANCOM_GPIB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
|
||||
{ 0 }
|
||||
{ PCI_VDEVICE(CBOARDS, PCI_DEVICE_ID_CBOARDS_PCI_GPIB) },
|
||||
{ PCI_VDEVICE(CBOARDS, PCI_DEVICE_ID_CBOARDS_CPCI_GPIB) },
|
||||
{ PCI_VDEVICE(QUANCOM, PCI_DEVICE_ID_QUANCOM_GPIB) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, cb7210_pci_table);
|
||||
|
||||
|
||||
@@ -353,8 +353,8 @@ static int cec_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
}
|
||||
|
||||
static const struct pci_device_id cec_pci_table[] = {
|
||||
{CEC_VENDOR_ID, CEC_DEV_ID, PCI_ANY_ID, CEC_SUBID, 0, 0, 0 },
|
||||
{0}
|
||||
{ PCI_DEVICE_SUB(CEC_VENDOR_ID, CEC_DEV_ID, PCI_ANY_ID, CEC_SUBID) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, cec_pci_table);
|
||||
|
||||
|
||||
@@ -371,14 +371,19 @@ enum ines_pci_subdevice_ids {
|
||||
};
|
||||
|
||||
static struct pci_device_id ines_pci_table[] = {
|
||||
{PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_PLX,
|
||||
PCI_SUBDEVICE_ID_INES_GPIB, 0, 0, 0},
|
||||
{PCI_VENDOR_ID_AMCC, PCI_DEVICE_ID_INES_GPIB_AMCC, PCI_VENDOR_ID_AMCC,
|
||||
PCI_SUBDEVICE_ID_INES_GPIB, 0, 0, 0},
|
||||
{PCI_VENDOR_ID_INES_QUICKLOGIC, PCI_DEVICE_ID_INES_GPIB_QL5030,
|
||||
PCI_VENDOR_ID_INES_QUICKLOGIC, PCI_DEVICE_ID_INES_GPIB_QL5030, 0, 0, 0},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_QUANCOM, PCI_DEVICE_ID_QUANCOM_GPIB)},
|
||||
{0}
|
||||
{
|
||||
PCI_VDEVICE_SUB(PLX, PCI_DEVICE_ID_PLX_9050,
|
||||
PCI_VENDOR_ID_PLX, PCI_SUBDEVICE_ID_INES_GPIB),
|
||||
}, {
|
||||
PCI_VDEVICE_SUB(AMCC, PCI_DEVICE_ID_INES_GPIB_AMCC,
|
||||
PCI_VENDOR_ID_AMCC, PCI_SUBDEVICE_ID_INES_GPIB),
|
||||
}, {
|
||||
PCI_VDEVICE_SUB(INES_QUICKLOGIC, PCI_DEVICE_ID_INES_GPIB_QL5030,
|
||||
PCI_VENDOR_ID_INES_QUICKLOGIC, PCI_DEVICE_ID_INES_GPIB_QL5030),
|
||||
}, {
|
||||
PCI_VDEVICE(QUANCOM, PCI_DEVICE_ID_QUANCOM_GPIB),
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, ines_pci_table);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user