xen-platform: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 2 Aug 2017 17:46:57 +0000 (23:16 +0530)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 31 Aug 2017 13:45:55 +0000 (09:45 -0400)
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>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/platform-pci.c

index 1275df83070f2186388cdf09aab3bbf1facf1326..5d7dcad0b0a0d345336e9489bc9acc71a9cefb6b 100644 (file)
@@ -175,7 +175,7 @@ pci_out:
        return ret;
 }
 
-static struct pci_device_id platform_pci_tbl[] = {
+static const struct pci_device_id platform_pci_tbl[] = {
        {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {0,}