Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1689332 > unrolled thread

[PATCH 10/11] net: qtnfmac: constify pci_device_id.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-07-17 20:20 +0200
Last post2017-07-17 20:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 10/11] net: qtnfmac: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-17 20:20 +0200

#1689332 — [PATCH 10/11] net: qtnfmac: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-17 20:20 +0200
Subject[PATCH 10/11] net: qtnfmac: constify pci_device_id.
Message-ID<u4iMH-8w3-41@gated-at.bofh.it>
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>
---
 drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
index 7fc4f0d..02337d8 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
@@ -1336,7 +1336,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,
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web