aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-09-12 15:54:10 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-09-12 15:54:10 -0400
commit1959ec5f82acbdf91425b41600f119ebecb5f6a8 (patch)
treeb54bc758f10632e991a3a80a94b05f3940b6651c
parenta63ab613ff48c593f4e9ace2d111978e35a202e4 (diff)
parent1d3520357df99baf4ad89f86268ac96cd38092d9 (diff)
Merge branch 'pci/stephen-const' into next
* pci/stephen-const: make drivers with pci error handlers const scsi: make pci error handlers const netdev: make pci_error_handlers const PCI: Make pci_error_handlers const
-rw-r--r--drivers/block/nvme.c2
-rw-r--r--drivers/infiniband/hw/qib/qib.h2
-rw-r--r--drivers/infiniband/hw/qib/qib_pcie.c2
-rw-r--r--drivers/media/dvb/ngene/ngene-cards.c2
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c2
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c2
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c2
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c2
-rw-r--r--drivers/net/ethernet/intel/e100.c2
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c2
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c2
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c2
-rw-r--r--drivers/net/ethernet/intel/igbvf/netdev.c2
-rw-r--r--drivers/net/ethernet/intel/ixgb/ixgb_main.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c2
-rw-r--r--drivers/net/ethernet/neterion/s2io.c2
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-main.c2
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c2
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c2
-rw-r--r--drivers/pci/pcie/aer/aerdrv.c2
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c8
-rw-r--r--drivers/pci/pcie/portdrv_pci.c10
-rw-r--r--drivers/scsi/ipr.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c2
-rw-r--r--drivers/tty/serial/8250/8250_pci.c2
-rw-r--r--drivers/tty/serial/jsm/jsm_driver.c2
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c2
-rw-r--r--include/linux/pci.h2
-rw-r--r--include/linux/pcieport_if.h2
41 files changed, 48 insertions, 48 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 38a2d0631882..c95ca0f8ff84 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1675,7 +1675,7 @@ static void __devexit nvme_remove(struct pci_dev *pdev)
1675#define nvme_suspend NULL 1675#define nvme_suspend NULL
1676#define nvme_resume NULL 1676#define nvme_resume NULL
1677 1677
1678static struct pci_error_handlers nvme_err_handler = { 1678static const struct pci_error_handlers nvme_err_handler = {
1679 .error_detected = nvme_error_detected, 1679 .error_detected = nvme_error_detected,
1680 .mmio_enabled = nvme_dump_registers, 1680 .mmio_enabled = nvme_dump_registers,
1681 .link_reset = nvme_link_reset, 1681 .link_reset = nvme_link_reset,
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h
index 7b1b86690024..4d11575c2010 100644
--- a/drivers/infiniband/hw/qib/qib.h
+++ b/drivers/infiniband/hw/qib/qib.h
@@ -87,7 +87,7 @@ struct qlogic_ib_stats {
87}; 87};
88 88
89extern struct qlogic_ib_stats qib_stats; 89extern struct qlogic_ib_stats qib_stats;
90extern struct pci_error_handlers qib_pci_err_handler; 90extern const struct pci_error_handlers qib_pci_err_handler;
91extern struct pci_driver qib_driver; 91extern struct pci_driver qib_driver;
92 92
93#define QIB_CHIP_SWVERSION QIB_CHIP_VERS_MAJ 93#define QIB_CHIP_SWVERSION QIB_CHIP_VERS_MAJ
diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
index 900137173210..c574ec7c85e6 100644
--- a/drivers/infiniband/hw/qib/qib_pcie.c
+++ b/drivers/infiniband/hw/qib/qib_pcie.c
@@ -745,7 +745,7 @@ qib_pci_resume(struct pci_dev *pdev)
745 qib_init(dd, 1); /* same as re-init after reset */ 745 qib_init(dd, 1); /* same as re-init after reset */
746} 746}
747 747
748struct pci_error_handlers qib_pci_err_handler = { 748const struct pci_error_handlers qib_pci_err_handler = {
749 .error_detected = qib_pci_error_detected, 749 .error_detected = qib_pci_error_detected,
750 .mmio_enabled = qib_pci_mmio_enabled, 750 .mmio_enabled = qib_pci_mmio_enabled,
751 .link_reset = qib_pci_link_reset, 751 .link_reset = qib_pci_link_reset,
diff --git a/drivers/media/dvb/ngene/ngene-cards.c b/drivers/media/dvb/ngene/ngene-cards.c
index 72ee8de02260..0a497be97af8 100644
--- a/drivers/media/dvb/ngene/ngene-cards.c
+++ b/drivers/media/dvb/ngene/ngene-cards.c
@@ -524,7 +524,7 @@ static void ngene_resume(struct pci_dev *dev)
524 printk(KERN_INFO DEVICE_NAME ": resume\n"); 524 printk(KERN_INFO DEVICE_NAME ": resume\n");
525} 525}
526 526
527static struct pci_error_handlers ngene_errors = { 527static const struct pci_error_handlers ngene_errors = {
528 .error_detected = ngene_error_detected, 528 .error_detected = ngene_error_detected,
529 .link_reset = ngene_link_reset, 529 .link_reset = ngene_link_reset,
530 .slot_reset = ngene_slot_reset, 530 .slot_reset = ngene_slot_reset,
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 8892e2b64498..55a2e3795055 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -2685,7 +2685,7 @@ static void atl1c_io_resume(struct pci_dev *pdev)
2685 netif_device_attach(netdev); 2685 netif_device_attach(netdev);
2686} 2686}
2687 2687
2688static struct pci_error_handlers atl1c_err_handler = { 2688static const struct pci_error_handlers atl1c_err_handler = {
2689 .error_detected = atl1c_io_error_detected, 2689 .error_detected = atl1c_io_error_detected,
2690 .slot_reset = atl1c_io_slot_reset, 2690 .slot_reset = atl1c_io_slot_reset,
2691 .resume = atl1c_io_resume, 2691 .resume = atl1c_io_resume,
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index a98acc8a956f..e213da29e73d 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -2489,7 +2489,7 @@ static void atl1e_io_resume(struct pci_dev *pdev)
2489 netif_device_attach(netdev); 2489 netif_device_attach(netdev);
2490} 2490}
2491 2491
2492static struct pci_error_handlers atl1e_err_handler = { 2492static const struct pci_error_handlers atl1e_err_handler = {
2493 .error_detected = atl1e_io_error_detected, 2493 .error_detected = atl1e_io_error_detected,
2494 .slot_reset = atl1e_io_slot_reset, 2494 .slot_reset = atl1e_io_slot_reset,
2495 .resume = atl1e_io_resume, 2495 .resume = atl1e_io_resume,
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 79cebd8525ce..a0e8399793b6 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -8742,7 +8742,7 @@ static void bnx2_io_resume(struct pci_dev *pdev)
8742 rtnl_unlock(); 8742 rtnl_unlock();
8743} 8743}
8744 8744
8745static struct pci_error_handlers bnx2_err_handler = { 8745static const struct pci_error_handlers bnx2_err_handler = {
8746 .error_detected = bnx2_io_error_detected, 8746 .error_detected = bnx2_io_error_detected,
8747 .slot_reset = bnx2_io_slot_reset, 8747 .slot_reset = bnx2_io_slot_reset,
8748 .resume = bnx2_io_resume, 8748 .resume = bnx2_io_resume,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 281cf3f7bc20..3de20c83c722 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12156,7 +12156,7 @@ static void bnx2x_io_resume(struct pci_dev *pdev)
12156 rtnl_unlock(); 12156 rtnl_unlock();
12157} 12157}
12158 12158
12159static struct pci_error_handlers bnx2x_err_handler = { 12159static const struct pci_error_handlers bnx2x_err_handler = {
12160 .error_detected = bnx2x_io_error_detected, 12160 .error_detected = bnx2x_io_error_detected,
12161 .slot_reset = bnx2x_io_slot_reset, 12161 .slot_reset = bnx2x_io_slot_reset,
12162 .resume = bnx2x_io_resume, 12162 .resume = bnx2x_io_resume,
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 8325fd8d4e5b..388d32213937 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -16373,7 +16373,7 @@ done:
16373 rtnl_unlock(); 16373 rtnl_unlock();
16374} 16374}
16375 16375
16376static struct pci_error_handlers tg3_err_handler = { 16376static const struct pci_error_handlers tg3_err_handler = {
16377 .error_detected = tg3_io_error_detected, 16377 .error_detected = tg3_io_error_detected,
16378 .slot_reset = tg3_io_slot_reset, 16378 .slot_reset = tg3_io_slot_reset,
16379 .resume = tg3_io_resume 16379 .resume = tg3_io_resume
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index 6505070abcfa..875bbb999aa2 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -3036,7 +3036,7 @@ static void t3_io_resume(struct pci_dev *pdev)
3036 t3_resume_ports(adapter); 3036 t3_resume_ports(adapter);
3037} 3037}
3038 3038
3039static struct pci_error_handlers t3_err_handler = { 3039static const struct pci_error_handlers t3_err_handler = {
3040 .error_detected = t3_io_error_detected, 3040 .error_detected = t3_io_error_detected,
3041 .slot_reset = t3_io_slot_reset, 3041 .slot_reset = t3_io_slot_reset,
3042 .resume = t3_io_resume, 3042 .resume = t3_io_resume,
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 4a20821511e7..933985420acb 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -3453,7 +3453,7 @@ static void eeh_resume(struct pci_dev *pdev)
3453 rtnl_unlock(); 3453 rtnl_unlock();
3454} 3454}
3455 3455
3456static struct pci_error_handlers cxgb4_eeh = { 3456static const struct pci_error_handlers cxgb4_eeh = {
3457 .error_detected = eeh_err_detected, 3457 .error_detected = eeh_err_detected,
3458 .slot_reset = eeh_slot_reset, 3458 .slot_reset = eeh_slot_reset,
3459 .resume = eeh_resume, 3459 .resume = eeh_resume,
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index c60de89b6669..a00295528281 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4104,7 +4104,7 @@ err:
4104 dev_err(&adapter->pdev->dev, "EEH resume failed\n"); 4104 dev_err(&adapter->pdev->dev, "EEH resume failed\n");
4105} 4105}
4106 4106
4107static struct pci_error_handlers be_eeh_handlers = { 4107static const struct pci_error_handlers be_eeh_handlers = {
4108 .error_detected = be_eeh_err_detected, 4108 .error_detected = be_eeh_err_detected,
4109 .slot_reset = be_eeh_reset, 4109 .slot_reset = be_eeh_reset,
4110 .resume = be_eeh_resume, 4110 .resume = be_eeh_resume,
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 535f94fac4a1..29ce9bd27f94 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -3157,7 +3157,7 @@ static void e100_io_resume(struct pci_dev *pdev)
3157 } 3157 }
3158} 3158}
3159 3159
3160static struct pci_error_handlers e100_err_handler = { 3160static const struct pci_error_handlers e100_err_handler = {
3161 .error_detected = e100_io_error_detected, 3161 .error_detected = e100_io_error_detected,
3162 .slot_reset = e100_io_slot_reset, 3162 .slot_reset = e100_io_slot_reset,
3163 .resume = e100_io_resume, 3163 .resume = e100_io_resume,
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 3bfbb8df8989..524cfb4cac61 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -192,7 +192,7 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
192static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev); 192static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev);
193static void e1000_io_resume(struct pci_dev *pdev); 193static void e1000_io_resume(struct pci_dev *pdev);
194 194
195static struct pci_error_handlers e1000_err_handler = { 195static const struct pci_error_handlers e1000_err_handler = {
196 .error_detected = e1000_io_error_detected, 196 .error_detected = e1000_io_error_detected,
197 .slot_reset = e1000_io_slot_reset, 197 .slot_reset = e1000_io_slot_reset,
198 .resume = e1000_io_resume, 198 .resume = e1000_io_resume,
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 9f474b2cc819..26a2ba2f8986 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6461,7 +6461,7 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
6461} 6461}
6462 6462
6463/* PCI Error Recovery (ERS) */ 6463/* PCI Error Recovery (ERS) */
6464static struct pci_error_handlers e1000_err_handler = { 6464static const struct pci_error_handlers e1000_err_handler = {
6465 .error_detected = e1000_io_error_detected, 6465 .error_detected = e1000_io_error_detected,
6466 .slot_reset = e1000_io_slot_reset, 6466 .slot_reset = e1000_io_slot_reset,
6467 .resume = e1000_io_resume, 6467 .resume = e1000_io_resume,
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 9a379d9c07fa..083ca330a336 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -217,7 +217,7 @@ static pci_ers_result_t igb_io_error_detected(struct pci_dev *,
217static pci_ers_result_t igb_io_slot_reset(struct pci_dev *); 217static pci_ers_result_t igb_io_slot_reset(struct pci_dev *);
218static void igb_io_resume(struct pci_dev *); 218static void igb_io_resume(struct pci_dev *);
219 219
220static struct pci_error_handlers igb_err_handler = { 220static const struct pci_error_handlers igb_err_handler = {
221 .error_detected = igb_io_error_detected, 221 .error_detected = igb_io_error_detected,
222 .slot_reset = igb_io_slot_reset, 222 .slot_reset = igb_io_slot_reset,
223 .resume = igb_io_resume, 223 .resume = igb_io_resume,
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index 0696abfe9944..0ac11f527a84 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2833,7 +2833,7 @@ static void __devexit igbvf_remove(struct pci_dev *pdev)
2833} 2833}
2834 2834
2835/* PCI Error Recovery (ERS) */ 2835/* PCI Error Recovery (ERS) */
2836static struct pci_error_handlers igbvf_err_handler = { 2836static const struct pci_error_handlers igbvf_err_handler = {
2837 .error_detected = igbvf_io_error_detected, 2837 .error_detected = igbvf_io_error_detected,
2838 .slot_reset = igbvf_io_slot_reset, 2838 .slot_reset = igbvf_io_slot_reset,
2839 .resume = igbvf_io_resume, 2839 .resume = igbvf_io_resume,
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
index d05fc95befc5..d99a2d51b948 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
@@ -115,7 +115,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
115static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); 115static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev);
116static void ixgb_io_resume (struct pci_dev *pdev); 116static void ixgb_io_resume (struct pci_dev *pdev);
117 117
118static struct pci_error_handlers ixgb_err_handler = { 118static const struct pci_error_handlers ixgb_err_handler = {
119 .error_detected = ixgb_io_error_detected, 119 .error_detected = ixgb_io_error_detected,
120 .slot_reset = ixgb_io_slot_reset, 120 .slot_reset = ixgb_io_slot_reset,
121 .resume = ixgb_io_resume, 121 .resume = ixgb_io_resume,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 976570d4c939..ee61819d6088 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7677,7 +7677,7 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
7677 netif_device_attach(netdev); 7677 netif_device_attach(netdev);
7678} 7678}
7679 7679
7680static struct pci_error_handlers ixgbe_err_handler = { 7680static const struct pci_error_handlers ixgbe_err_handler = {
7681 .error_detected = ixgbe_io_error_detected, 7681 .error_detected = ixgbe_io_error_detected,
7682 .slot_reset = ixgbe_io_slot_reset, 7682 .slot_reset = ixgbe_io_slot_reset,
7683 .resume = ixgbe_io_resume, 7683 .resume = ixgbe_io_resume,
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 60ef64587412..6647383c4ddc 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3256,7 +3256,7 @@ static void ixgbevf_io_resume(struct pci_dev *pdev)
3256} 3256}
3257 3257
3258/* PCI Error Recovery (ERS) */ 3258/* PCI Error Recovery (ERS) */
3259static struct pci_error_handlers ixgbevf_err_handler = { 3259static const struct pci_error_handlers ixgbevf_err_handler = {
3260 .error_detected = ixgbevf_io_error_detected, 3260 .error_detected = ixgbevf_io_error_detected,
3261 .slot_reset = ixgbevf_io_slot_reset, 3261 .slot_reset = ixgbevf_io_slot_reset,
3262 .resume = ixgbevf_io_resume, 3262 .resume = ixgbevf_io_resume,
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 48d0e90194cb..d89e89b415cf 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2301,7 +2301,7 @@ static pci_ers_result_t mlx4_pci_slot_reset(struct pci_dev *pdev)
2301 return ret ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED; 2301 return ret ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED;
2302} 2302}
2303 2303
2304static struct pci_error_handlers mlx4_err_handler = { 2304static const struct pci_error_handlers mlx4_err_handler = {
2305 .error_detected = mlx4_pci_err_detected, 2305 .error_detected = mlx4_pci_err_detected,
2306 .slot_reset = mlx4_pci_slot_reset, 2306 .slot_reset = mlx4_pci_slot_reset,
2307}; 2307};
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index d958c2299372..de50547c187d 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -484,7 +484,7 @@ static DEFINE_PCI_DEVICE_TABLE(s2io_tbl) = {
484 484
485MODULE_DEVICE_TABLE(pci, s2io_tbl); 485MODULE_DEVICE_TABLE(pci, s2io_tbl);
486 486
487static struct pci_error_handlers s2io_err_handler = { 487static const struct pci_error_handlers s2io_err_handler = {
488 .error_detected = s2io_io_error_detected, 488 .error_detected = s2io_io_error_detected,
489 .slot_reset = s2io_io_slot_reset, 489 .slot_reset = s2io_io_slot_reset,
490 .resume = s2io_io_resume, 490 .resume = s2io_io_resume,
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index de2190443510..cfa71a30dc8d 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -4799,7 +4799,7 @@ static void __devexit vxge_remove(struct pci_dev *pdev)
4799 __LINE__); 4799 __LINE__);
4800} 4800}
4801 4801
4802static struct pci_error_handlers vxge_err_handler = { 4802static const struct pci_error_handlers vxge_err_handler = {
4803 .error_detected = vxge_io_error_detected, 4803 .error_detected = vxge_io_error_detected,
4804 .slot_reset = vxge_io_slot_reset, 4804 .slot_reset = vxge_io_slot_reset,
4805 .resume = vxge_io_resume, 4805 .resume = vxge_io_resume,
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index feb85d56c750..b2a94d02a521 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -2795,7 +2795,7 @@ static const struct dev_pm_ops pch_gbe_pm_ops = {
2795}; 2795};
2796#endif 2796#endif
2797 2797
2798static struct pci_error_handlers pch_gbe_err_handler = { 2798static const struct pci_error_handlers pch_gbe_err_handler = {
2799 .error_detected = pch_gbe_io_error_detected, 2799 .error_detected = pch_gbe_io_error_detected,
2800 .slot_reset = pch_gbe_io_slot_reset, 2800 .slot_reset = pch_gbe_io_slot_reset,
2801 .resume = pch_gbe_io_resume 2801 .resume = pch_gbe_io_resume
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 01d6141cedd9..fdc5ca0f7b64 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -3336,7 +3336,7 @@ netxen_free_vlan_ip_list(struct netxen_adapter *adapter)
3336{ } 3336{ }
3337#endif 3337#endif
3338 3338
3339static struct pci_error_handlers netxen_err_handler = { 3339static const struct pci_error_handlers netxen_err_handler = {
3340 .error_detected = netxen_io_error_detected, 3340 .error_detected = netxen_io_error_detected,
3341 .slot_reset = netxen_io_slot_reset, 3341 .slot_reset = netxen_io_slot_reset,
3342 .resume = netxen_io_resume, 3342 .resume = netxen_io_resume,
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 212c12193275..473ce134ca63 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -4522,7 +4522,7 @@ static void
4522qlcnic_restore_indev_addr(struct net_device *dev, unsigned long event) 4522qlcnic_restore_indev_addr(struct net_device *dev, unsigned long event)
4523{ } 4523{ }
4524#endif 4524#endif
4525static struct pci_error_handlers qlcnic_err_handler = { 4525static const struct pci_error_handlers qlcnic_err_handler = {
4526 .error_detected = qlcnic_io_error_detected, 4526 .error_detected = qlcnic_io_error_detected,
4527 .slot_reset = qlcnic_io_slot_reset, 4527 .slot_reset = qlcnic_io_slot_reset,
4528 .resume = qlcnic_io_resume, 4528 .resume = qlcnic_io_resume,
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index b53a3b60b648..b262d6156816 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4847,7 +4847,7 @@ static void qlge_io_resume(struct pci_dev *pdev)
4847 netif_device_attach(ndev); 4847 netif_device_attach(ndev);
4848} 4848}
4849 4849
4850static struct pci_error_handlers qlge_err_handler = { 4850static const struct pci_error_handlers qlge_err_handler = {
4851 .error_detected = qlge_io_error_detected, 4851 .error_detected = qlge_io_error_detected,
4852 .slot_reset = qlge_io_slot_reset, 4852 .slot_reset = qlge_io_slot_reset,
4853 .resume = qlge_io_resume, 4853 .resume = qlge_io_resume,
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index c78778fc0cba..030cf12d5468 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -48,7 +48,7 @@ static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
48static void aer_error_resume(struct pci_dev *dev); 48static void aer_error_resume(struct pci_dev *dev);
49static pci_ers_result_t aer_root_reset(struct pci_dev *dev); 49static pci_ers_result_t aer_root_reset(struct pci_dev *dev);
50 50
51static struct pci_error_handlers aer_error_handlers = { 51static const struct pci_error_handlers aer_error_handlers = {
52 .error_detected = aer_error_detected, 52 .error_detected = aer_error_detected,
53 .resume = aer_error_resume, 53 .resume = aer_error_resume,
54}; 54};
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index cefc0ddcacf6..cd46d74ec806 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -209,7 +209,7 @@ static bool find_source_device(struct pci_dev *parent,
209static int report_error_detected(struct pci_dev *dev, void *data) 209static int report_error_detected(struct pci_dev *dev, void *data)
210{ 210{
211 pci_ers_result_t vote; 211 pci_ers_result_t vote;
212 struct pci_error_handlers *err_handler; 212 const struct pci_error_handlers *err_handler;
213 struct aer_broadcast_data *result_data; 213 struct aer_broadcast_data *result_data;
214 result_data = (struct aer_broadcast_data *) data; 214 result_data = (struct aer_broadcast_data *) data;
215 215
@@ -243,7 +243,7 @@ static int report_error_detected(struct pci_dev *dev, void *data)
243static int report_mmio_enabled(struct pci_dev *dev, void *data) 243static int report_mmio_enabled(struct pci_dev *dev, void *data)
244{ 244{
245 pci_ers_result_t vote; 245 pci_ers_result_t vote;
246 struct pci_error_handlers *err_handler; 246 const struct pci_error_handlers *err_handler;
247 struct aer_broadcast_data *result_data; 247 struct aer_broadcast_data *result_data;
248 result_data = (struct aer_broadcast_data *) data; 248 result_data = (struct aer_broadcast_data *) data;
249 249
@@ -261,7 +261,7 @@ static int report_mmio_enabled(struct pci_dev *dev, void *data)
261static int report_slot_reset(struct pci_dev *dev, void *data) 261static int report_slot_reset(struct pci_dev *dev, void *data)
262{ 262{
263 pci_ers_result_t vote; 263 pci_ers_result_t vote;
264 struct pci_error_handlers *err_handler; 264 const struct pci_error_handlers *err_handler;
265 struct aer_broadcast_data *result_data; 265 struct aer_broadcast_data *result_data;
266 result_data = (struct aer_broadcast_data *) data; 266 result_data = (struct aer_broadcast_data *) data;
267 267
@@ -278,7 +278,7 @@ static int report_slot_reset(struct pci_dev *dev, void *data)
278 278
279static int report_resume(struct pci_dev *dev, void *data) 279static int report_resume(struct pci_dev *dev, void *data)
280{ 280{
281 struct pci_error_handlers *err_handler; 281 const struct pci_error_handlers *err_handler;
282 282
283 dev->error_state = pci_channel_io_normal; 283 dev->error_state = pci_channel_io_normal;
284 284
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 2360330e48f1..ca10911ee0df 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -364,11 +364,11 @@ static const struct pci_device_id port_pci_ids[] = { {
364}; 364};
365MODULE_DEVICE_TABLE(pci, port_pci_ids); 365MODULE_DEVICE_TABLE(pci, port_pci_ids);
366 366
367static struct pci_error_handlers pcie_portdrv_err_handler = { 367static const struct pci_error_handlers pcie_portdrv_err_handler = {
368 .error_detected = pcie_portdrv_error_detected, 368 .error_detected = pcie_portdrv_error_detected,
369 .mmio_enabled = pcie_portdrv_mmio_enabled, 369 .mmio_enabled = pcie_portdrv_mmio_enabled,
370 .slot_reset = pcie_portdrv_slot_reset, 370 .slot_reset = pcie_portdrv_slot_reset,
371 .resume = pcie_portdrv_err_resume, 371 .resume = pcie_portdrv_err_resume,
372}; 372};
373 373
374static struct pci_driver pcie_portdriver = { 374static struct pci_driver pcie_portdriver = {
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 467dc38246f9..b91fa7aed37c 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -9228,7 +9228,7 @@ static struct pci_device_id ipr_pci_table[] __devinitdata = {
9228}; 9228};
9229MODULE_DEVICE_TABLE(pci, ipr_pci_table); 9229MODULE_DEVICE_TABLE(pci, ipr_pci_table);
9230 9230
9231static struct pci_error_handlers ipr_err_handler = { 9231static const struct pci_error_handlers ipr_err_handler = {
9232 .error_detected = ipr_pci_error_detected, 9232 .error_detected = ipr_pci_error_detected,
9233 .slot_reset = ipr_pci_slot_reset, 9233 .slot_reset = ipr_pci_slot_reset,
9234}; 9234};
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 45c15208be9f..a979e2765cf6 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -10425,7 +10425,7 @@ static struct pci_device_id lpfc_id_table[] = {
10425 10425
10426MODULE_DEVICE_TABLE(pci, lpfc_id_table); 10426MODULE_DEVICE_TABLE(pci, lpfc_id_table);
10427 10427
10428static struct pci_error_handlers lpfc_err_handler = { 10428static const struct pci_error_handlers lpfc_err_handler = {
10429 .error_detected = lpfc_io_error_detected, 10429 .error_detected = lpfc_io_error_detected,
10430 .slot_reset = lpfc_io_slot_reset, 10430 .slot_reset = lpfc_io_slot_reset,
10431 .resume = lpfc_io_resume, 10431 .resume = lpfc_io_resume,
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index b1ebd6f8dab3..1ccae45c5270 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -8306,7 +8306,7 @@ _scsih_pci_mmio_enabled(struct pci_dev *pdev)
8306 return PCI_ERS_RESULT_NEED_RESET; 8306 return PCI_ERS_RESULT_NEED_RESET;
8307} 8307}
8308 8308
8309static struct pci_error_handlers _scsih_err_handler = { 8309static const struct pci_error_handlers _scsih_err_handler = {
8310 .error_detected = _scsih_pci_error_detected, 8310 .error_detected = _scsih_pci_error_detected,
8311 .mmio_enabled = _scsih_pci_mmio_enabled, 8311 .mmio_enabled = _scsih_pci_mmio_enabled,
8312 .slot_reset = _scsih_pci_slot_reset, 8312 .slot_reset = _scsih_pci_slot_reset,
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index fb8cd3847d4b..d3052622e77a 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4471,7 +4471,7 @@ qla2xxx_pci_resume(struct pci_dev *pdev)
4471 ha->flags.eeh_busy = 0; 4471 ha->flags.eeh_busy = 0;
4472} 4472}
4473 4473
4474static struct pci_error_handlers qla2xxx_err_handler = { 4474static const struct pci_error_handlers qla2xxx_err_handler = {
4475 .error_detected = qla2xxx_pci_error_detected, 4475 .error_detected = qla2xxx_pci_error_detected,
4476 .mmio_enabled = qla2xxx_pci_mmio_enabled, 4476 .mmio_enabled = qla2xxx_pci_mmio_enabled,
4477 .slot_reset = qla2xxx_pci_slot_reset, 4477 .slot_reset = qla2xxx_pci_slot_reset,
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 9da426628b97..c75ca26298d6 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -6148,7 +6148,7 @@ qla4xxx_pci_resume(struct pci_dev *pdev)
6148 clear_bit(AF_EEH_BUSY, &ha->flags); 6148 clear_bit(AF_EEH_BUSY, &ha->flags);
6149} 6149}
6150 6150
6151static struct pci_error_handlers qla4xxx_err_handler = { 6151static const struct pci_error_handlers qla4xxx_err_handler = {
6152 .error_detected = qla4xxx_pci_error_detected, 6152 .error_detected = qla4xxx_pci_error_detected,
6153 .mmio_enabled = qla4xxx_pci_mmio_enabled, 6153 .mmio_enabled = qla4xxx_pci_mmio_enabled,
6154 .slot_reset = qla4xxx_pci_slot_reset, 6154 .slot_reset = qla4xxx_pci_slot_reset,
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 36d1ed7817eb..e2b8e68b57e7 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -2117,7 +2117,7 @@ static struct pci_device_id sym2_id_table[] __devinitdata = {
2117 2117
2118MODULE_DEVICE_TABLE(pci, sym2_id_table); 2118MODULE_DEVICE_TABLE(pci, sym2_id_table);
2119 2119
2120static struct pci_error_handlers sym2_err_handler = { 2120static const struct pci_error_handlers sym2_err_handler = {
2121 .error_detected = sym2_io_error_detected, 2121 .error_detected = sym2_io_error_detected,
2122 .mmio_enabled = sym2_io_slot_dump, 2122 .mmio_enabled = sym2_io_slot_dump,
2123 .slot_reset = sym2_io_slot_reset, 2123 .slot_reset = sym2_io_slot_reset,
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 28e7c7cce893..452278efef29 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -4236,7 +4236,7 @@ static void serial8250_io_resume(struct pci_dev *dev)
4236 pciserial_resume_ports(priv); 4236 pciserial_resume_ports(priv);
4237} 4237}
4238 4238
4239static struct pci_error_handlers serial8250_err_handler = { 4239static const struct pci_error_handlers serial8250_err_handler = {
4240 .error_detected = serial8250_io_error_detected, 4240 .error_detected = serial8250_io_error_detected,
4241 .slot_reset = serial8250_io_slot_reset, 4241 .slot_reset = serial8250_io_slot_reset,
4242 .resume = serial8250_io_resume, 4242 .resume = serial8250_io_resume,
diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c
index 7545fe1b9925..5ab3c3b595e4 100644
--- a/drivers/tty/serial/jsm/jsm_driver.c
+++ b/drivers/tty/serial/jsm/jsm_driver.c
@@ -54,7 +54,7 @@ static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev,
54static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev); 54static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev);
55static void jsm_io_resume(struct pci_dev *pdev); 55static void jsm_io_resume(struct pci_dev *pdev);
56 56
57static struct pci_error_handlers jsm_err_handler = { 57static const struct pci_error_handlers jsm_err_handler = {
58 .error_detected = jsm_io_error_detected, 58 .error_detected = jsm_io_error_detected,
59 .slot_reset = jsm_io_slot_reset, 59 .slot_reset = jsm_io_slot_reset,
60 .resume = jsm_io_resume, 60 .resume = jsm_io_resume,
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 097e536e8672..0f1539edbd01 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -871,7 +871,7 @@ end:
871} 871}
872 872
873/*add xen_pcibk AER handling*/ 873/*add xen_pcibk AER handling*/
874static struct pci_error_handlers xen_pcibk_error_handler = { 874static const struct pci_error_handlers xen_pcibk_error_handler = {
875 .error_detected = xen_pcibk_error_detected, 875 .error_detected = xen_pcibk_error_detected,
876 .mmio_enabled = xen_pcibk_mmio_enabled, 876 .mmio_enabled = xen_pcibk_mmio_enabled,
877 .slot_reset = xen_pcibk_slot_reset, 877 .slot_reset = xen_pcibk_slot_reset,
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e52f16189cda..f3b074eb117c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -595,7 +595,7 @@ struct pci_driver {
595 int (*resume_early) (struct pci_dev *dev); 595 int (*resume_early) (struct pci_dev *dev);
596 int (*resume) (struct pci_dev *dev); /* Device woken up */ 596 int (*resume) (struct pci_dev *dev); /* Device woken up */
597 void (*shutdown) (struct pci_dev *dev); 597 void (*shutdown) (struct pci_dev *dev);
598 struct pci_error_handlers *err_handler; 598 const struct pci_error_handlers *err_handler;
599 struct device_driver driver; 599 struct device_driver driver;
600 struct pci_dynids dynids; 600 struct pci_dynids dynids;
601}; 601};
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h
index 6775532b92a9..e6f91b1406d8 100644
--- a/include/linux/pcieport_if.h
+++ b/include/linux/pcieport_if.h
@@ -49,7 +49,7 @@ struct pcie_port_service_driver {
49 int (*resume) (struct pcie_device *dev); 49 int (*resume) (struct pcie_device *dev);
50 50
51 /* Service Error Recovery Handler */ 51 /* Service Error Recovery Handler */
52 struct pci_error_handlers *err_handler; 52 const struct pci_error_handlers *err_handler;
53 53
54 /* Link Reset Capability - AER service driver specific */ 54 /* Link Reset Capability - AER service driver specific */
55 pci_ers_result_t (*reset_link) (struct pci_dev *dev); 55 pci_ers_result_t (*reset_link) (struct pci_dev *dev);