Commit 768ffc66 authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller

cxgb4/cxgb4vf/csiostor: Make PCI Device ID Tables be "const"

Make PCI Device ID Tables be "const" to move them out of the data segment and
remove a redundant check on CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN in
t4_pci_id_tbl.h to guard the contents of the include file.
Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 933e0db1
...@@ -124,7 +124,7 @@ struct filter_entry { ...@@ -124,7 +124,7 @@ struct filter_entry {
/* Macros needed to support the PCI Device ID Table ... /* Macros needed to support the PCI Device ID Table ...
*/ */
#define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \
static struct pci_device_id cxgb4_pci_tbl[] = { static const struct pci_device_id cxgb4_pci_tbl[] = {
#define CH_PCI_DEVICE_ID_FUNCTION 0x4 #define CH_PCI_DEVICE_ID_FUNCTION 0x4
/* Include PCI Device IDs for both PF4 and PF0-3 so our PCI probe() routine is /* Include PCI Device IDs for both PF4 and PF0-3 so our PCI probe() routine is
......
...@@ -60,8 +60,6 @@ ...@@ -60,8 +60,6 @@
* -- Used to finish the definition of the PCI ID Table. Note that we * -- Used to finish the definition of the PCI ID Table. Note that we
* -- will be adding a trailing semi-colon (";") here. * -- will be adding a trailing semi-colon (";") here.
*/ */
#ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
#ifndef CH_PCI_DEVICE_ID_FUNCTION #ifndef CH_PCI_DEVICE_ID_FUNCTION
#error CH_PCI_DEVICE_ID_FUNCTION not defined! #error CH_PCI_DEVICE_ID_FUNCTION not defined!
#endif #endif
...@@ -157,6 +155,4 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN ...@@ -157,6 +155,4 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */ CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */
CH_PCI_DEVICE_ID_TABLE_DEFINE_END; CH_PCI_DEVICE_ID_TABLE_DEFINE_END;
#endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */
#endif /* __T4_PCI_ID_TBL_H__ */ #endif /* __T4_PCI_ID_TBL_H__ */
...@@ -3034,7 +3034,7 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev) ...@@ -3034,7 +3034,7 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev)
/* Macros needed to support the PCI Device ID Table ... /* Macros needed to support the PCI Device ID Table ...
*/ */
#define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \
static struct pci_device_id cxgb4vf_pci_tbl[] = { static const struct pci_device_id cxgb4vf_pci_tbl[] = {
#define CH_PCI_DEVICE_ID_FUNCTION 0x8 #define CH_PCI_DEVICE_ID_FUNCTION 0x8
#define CH_PCI_ID_TABLE_ENTRY(devid) \ #define CH_PCI_ID_TABLE_ENTRY(devid) \
......
...@@ -1172,7 +1172,7 @@ static struct pci_error_handlers csio_err_handler = { ...@@ -1172,7 +1172,7 @@ static struct pci_error_handlers csio_err_handler = {
* Macros needed to support the PCI Device ID Table ... * Macros needed to support the PCI Device ID Table ...
*/ */
#define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \
static struct pci_device_id csio_pci_tbl[] = { static const struct pci_device_id csio_pci_tbl[] = {
/* Define for FCoE uses PF6 */ /* Define for FCoE uses PF6 */
#define CH_PCI_DEVICE_ID_FUNCTION 0x6 #define CH_PCI_DEVICE_ID_FUNCTION 0x6
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment