提交 1d352035 编写于 作者: S Stephen Hemminger 提交者: Bjorn Helgaas

make drivers with pci error handlers const

Covers the rest of the uses of pci error handler.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 a55b2d21
...@@ -1675,7 +1675,7 @@ static void __devexit nvme_remove(struct pci_dev *pdev) ...@@ -1675,7 +1675,7 @@ static void __devexit nvme_remove(struct pci_dev *pdev)
#define nvme_suspend NULL #define nvme_suspend NULL
#define nvme_resume 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, .error_detected = nvme_error_detected,
.mmio_enabled = nvme_dump_registers, .mmio_enabled = nvme_dump_registers,
.link_reset = nvme_link_reset, .link_reset = nvme_link_reset,
......
...@@ -87,7 +87,7 @@ struct qlogic_ib_stats { ...@@ -87,7 +87,7 @@ struct qlogic_ib_stats {
}; };
extern struct qlogic_ib_stats qib_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; extern struct pci_driver qib_driver;
#define QIB_CHIP_SWVERSION QIB_CHIP_VERS_MAJ #define QIB_CHIP_SWVERSION QIB_CHIP_VERS_MAJ
......
...@@ -753,7 +753,7 @@ qib_pci_resume(struct pci_dev *pdev) ...@@ -753,7 +753,7 @@ qib_pci_resume(struct pci_dev *pdev)
qib_init(dd, 1); /* same as re-init after reset */ 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, .error_detected = qib_pci_error_detected,
.mmio_enabled = qib_pci_mmio_enabled, .mmio_enabled = qib_pci_mmio_enabled,
.link_reset = qib_pci_link_reset, .link_reset = qib_pci_link_reset,
......
...@@ -524,7 +524,7 @@ static void ngene_resume(struct pci_dev *dev) ...@@ -524,7 +524,7 @@ static void ngene_resume(struct pci_dev *dev)
printk(KERN_INFO DEVICE_NAME ": resume\n"); 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, .error_detected = ngene_error_detected,
.link_reset = ngene_link_reset, .link_reset = ngene_link_reset,
.slot_reset = ngene_slot_reset, .slot_reset = ngene_slot_reset,
......
...@@ -4236,7 +4236,7 @@ static void serial8250_io_resume(struct pci_dev *dev) ...@@ -4236,7 +4236,7 @@ static void serial8250_io_resume(struct pci_dev *dev)
pciserial_resume_ports(priv); 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, .error_detected = serial8250_io_error_detected,
.slot_reset = serial8250_io_slot_reset, .slot_reset = serial8250_io_slot_reset,
.resume = serial8250_io_resume, .resume = serial8250_io_resume,
......
...@@ -54,7 +54,7 @@ static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev, ...@@ -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 pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev);
static void jsm_io_resume(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, .error_detected = jsm_io_error_detected,
.slot_reset = jsm_io_slot_reset, .slot_reset = jsm_io_slot_reset,
.resume = jsm_io_resume, .resume = jsm_io_resume,
......
...@@ -871,7 +871,7 @@ static void xen_pcibk_error_resume(struct pci_dev *dev) ...@@ -871,7 +871,7 @@ static void xen_pcibk_error_resume(struct pci_dev *dev)
} }
/*add xen_pcibk AER handling*/ /*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, .error_detected = xen_pcibk_error_detected,
.mmio_enabled = xen_pcibk_mmio_enabled, .mmio_enabled = xen_pcibk_mmio_enabled,
.slot_reset = xen_pcibk_slot_reset, .slot_reset = xen_pcibk_slot_reset,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册