net: qtnfmac: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 17 Jul 2017 18:14:23 +0000 (23:44 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 3 Aug 2017 10:09:36 +0000 (13:09 +0300)
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: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c

index 2c065ff..ae8acc1 100644 (file)
@@ -1310,7 +1310,7 @@ static SIMPLE_DEV_PM_OPS(qtnf_pcie_pm_ops, qtnf_pcie_suspend,
                         qtnf_pcie_resume);
 #endif
 
-static struct pci_device_id qtnf_pcie_devid_table[] = {
+static const struct pci_device_id qtnf_pcie_devid_table[] = {
        {
                PCIE_VENDOR_ID_QUANTENNA, PCIE_DEVICE_ID_QTN_PEARL,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,