make drivers with pci error handlers const
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 7 Sep 2012 16:33:17 +0000 (09:33 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 7 Sep 2012 22:35:00 +0000 (16:35 -0600)
Covers the rest of the uses of pci error handler.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/block/nvme.c
drivers/infiniband/hw/qib/qib.h
drivers/infiniband/hw/qib/qib_pcie.c
drivers/media/dvb/ngene/ngene-cards.c
drivers/tty/serial/8250/8250_pci.c
drivers/tty/serial/jsm/jsm_driver.c
drivers/xen/xen-pciback/pci_stub.c

index 38a2d06..c95ca0f 100644 (file)
@@ -1675,7 +1675,7 @@ static void __devexit nvme_remove(struct pci_dev *pdev)
 #define nvme_suspend NULL
 #define nvme_resume NULL
 
-static struct pci_error_handlers nvme_err_handler = {
+static const struct pci_error_handlers nvme_err_handler = {
        .error_detected = nvme_error_detected,
        .mmio_enabled   = nvme_dump_registers,
        .link_reset     = nvme_link_reset,
index 7b1b866..4d11575 100644 (file)
@@ -87,7 +87,7 @@ struct qlogic_ib_stats {
 };
 
 extern struct qlogic_ib_stats qib_stats;
-extern struct pci_error_handlers qib_pci_err_handler;
+extern const struct pci_error_handlers qib_pci_err_handler;
 extern struct pci_driver qib_driver;
 
 #define QIB_CHIP_SWVERSION QIB_CHIP_VERS_MAJ
index 062c301..8fd03a8 100644 (file)
@@ -753,7 +753,7 @@ qib_pci_resume(struct pci_dev *pdev)
        qib_init(dd, 1); /* same as re-init after reset */
 }
 
-struct pci_error_handlers qib_pci_err_handler = {
+const struct pci_error_handlers qib_pci_err_handler = {
        .error_detected = qib_pci_error_detected,
        .mmio_enabled = qib_pci_mmio_enabled,
        .link_reset = qib_pci_link_reset,
index 72ee8de..0a497be 100644 (file)
@@ -524,7 +524,7 @@ static void ngene_resume(struct pci_dev *dev)
        printk(KERN_INFO DEVICE_NAME ": resume\n");
 }
 
-static struct pci_error_handlers ngene_errors = {
+static const struct pci_error_handlers ngene_errors = {
        .error_detected = ngene_error_detected,
        .link_reset = ngene_link_reset,
        .slot_reset = ngene_slot_reset,
index 28e7c7c..452278e 100644 (file)
@@ -4236,7 +4236,7 @@ static void serial8250_io_resume(struct pci_dev *dev)
                pciserial_resume_ports(priv);
 }
 
-static struct pci_error_handlers serial8250_err_handler = {
+static const struct pci_error_handlers serial8250_err_handler = {
        .error_detected = serial8250_io_error_detected,
        .slot_reset = serial8250_io_slot_reset,
        .resume = serial8250_io_resume,
index 7545fe1..5ab3c3b 100644 (file)
@@ -54,7 +54,7 @@ static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev,
 static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev);
 static void jsm_io_resume(struct pci_dev *pdev);
 
-static struct pci_error_handlers jsm_err_handler = {
+static const struct pci_error_handlers jsm_err_handler = {
        .error_detected = jsm_io_error_detected,
        .slot_reset = jsm_io_slot_reset,
        .resume = jsm_io_resume,
index 097e536..0f1539e 100644 (file)
@@ -871,7 +871,7 @@ end:
 }
 
 /*add xen_pcibk AER handling*/
-static struct pci_error_handlers xen_pcibk_error_handler = {
+static const struct pci_error_handlers xen_pcibk_error_handler = {
        .error_detected = xen_pcibk_error_detected,
        .mmio_enabled = xen_pcibk_mmio_enabled,
        .slot_reset = xen_pcibk_slot_reset,