mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 10:56:14 +00:00
PCI: Constify hotplug pci_device_id structures
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> [bhelgaas: squash shpchp, ibmphp, bmphp_ebda, cpcihp_zt5550, cpqphp] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
4bd3256c35
commit
8394264da2
@ -280,7 +280,7 @@ static void zt5550_hc_remove_one(struct pci_dev *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct pci_device_id zt5550_hc_pci_tbl[] = {
|
static const struct pci_device_id zt5550_hc_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_ZIATECH, PCI_DEVICE_ID_ZIATECH_5550_HC, PCI_ANY_ID, PCI_ANY_ID, },
|
{ PCI_VENDOR_ID_ZIATECH, PCI_DEVICE_ID_ZIATECH_5550_HC, PCI_ANY_ID, PCI_ANY_ID, },
|
||||||
{ 0, }
|
{ 0, }
|
||||||
};
|
};
|
||||||
|
@ -1417,7 +1417,7 @@ static void __exit unload_cpqphpd(void)
|
|||||||
iounmap(smbios_start);
|
iounmap(smbios_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id hpcd_pci_tbl[] = {
|
static const struct pci_device_id hpcd_pci_tbl[] = {
|
||||||
{
|
{
|
||||||
/* handle any PCI Hotplug controller */
|
/* handle any PCI Hotplug controller */
|
||||||
.class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
|
.class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
|
||||||
|
@ -852,7 +852,7 @@ static int set_bus(struct slot *slot_cur)
|
|||||||
u8 speed;
|
u8 speed;
|
||||||
u8 cmd = 0x0;
|
u8 cmd = 0x0;
|
||||||
int retval;
|
int retval;
|
||||||
static struct pci_device_id ciobx[] = {
|
static const struct pci_device_id ciobx[] = {
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, 0x0101) },
|
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, 0x0101) },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
@ -1153,7 +1153,7 @@ void ibmphp_free_ebda_pci_rsrc_queue(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id id_table[] = {
|
static const struct pci_device_id id_table[] = {
|
||||||
{
|
{
|
||||||
.vendor = PCI_VENDOR_ID_IBM,
|
.vendor = PCI_VENDOR_ID_IBM,
|
||||||
.device = HPC_DEVICE_ID,
|
.device = HPC_DEVICE_ID,
|
||||||
|
@ -351,7 +351,7 @@ static void shpc_remove(struct pci_dev *dev)
|
|||||||
kfree(ctrl);
|
kfree(ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id shpcd_pci_tbl[] = {
|
static const struct pci_device_id shpcd_pci_tbl[] = {
|
||||||
{PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0)},
|
{PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0)},
|
||||||
{ /* end: all zeroes */ }
|
{ /* end: all zeroes */ }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user