diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2012-09-07 12:33:14 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-07 18:24:59 -0400 |
commit | 494530284f16298050ab99f54b7b12dd7d1418a1 (patch) | |
tree | c9f89874141cb81f17e06113add2b1019c3df17d /drivers/pci/pcie/aer | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
PCI: Make pci_error_handlers const
Since pci_error_handlers is just a function table make it const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Diffstat (limited to 'drivers/pci/pcie/aer')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index 58ad7917553c..7131644e3ae6 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, | |||
48 | static void aer_error_resume(struct pci_dev *dev); | 48 | static void aer_error_resume(struct pci_dev *dev); |
49 | static pci_ers_result_t aer_root_reset(struct pci_dev *dev); | 49 | static pci_ers_result_t aer_root_reset(struct pci_dev *dev); |
50 | 50 | ||
51 | static struct pci_error_handlers aer_error_handlers = { | 51 | static 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 0ca053538146..dc901771d34b 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -240,7 +240,7 @@ static bool find_source_device(struct pci_dev *parent, | |||
240 | static int report_error_detected(struct pci_dev *dev, void *data) | 240 | static int report_error_detected(struct pci_dev *dev, void *data) |
241 | { | 241 | { |
242 | pci_ers_result_t vote; | 242 | pci_ers_result_t vote; |
243 | struct pci_error_handlers *err_handler; | 243 | const struct pci_error_handlers *err_handler; |
244 | struct aer_broadcast_data *result_data; | 244 | struct aer_broadcast_data *result_data; |
245 | result_data = (struct aer_broadcast_data *) data; | 245 | result_data = (struct aer_broadcast_data *) data; |
246 | 246 | ||
@@ -274,7 +274,7 @@ static int report_error_detected(struct pci_dev *dev, void *data) | |||
274 | static int report_mmio_enabled(struct pci_dev *dev, void *data) | 274 | static int report_mmio_enabled(struct pci_dev *dev, void *data) |
275 | { | 275 | { |
276 | pci_ers_result_t vote; | 276 | pci_ers_result_t vote; |
277 | struct pci_error_handlers *err_handler; | 277 | const struct pci_error_handlers *err_handler; |
278 | struct aer_broadcast_data *result_data; | 278 | struct aer_broadcast_data *result_data; |
279 | result_data = (struct aer_broadcast_data *) data; | 279 | result_data = (struct aer_broadcast_data *) data; |
280 | 280 | ||
@@ -292,7 +292,7 @@ static int report_mmio_enabled(struct pci_dev *dev, void *data) | |||
292 | static int report_slot_reset(struct pci_dev *dev, void *data) | 292 | static int report_slot_reset(struct pci_dev *dev, void *data) |
293 | { | 293 | { |
294 | pci_ers_result_t vote; | 294 | pci_ers_result_t vote; |
295 | struct pci_error_handlers *err_handler; | 295 | const struct pci_error_handlers *err_handler; |
296 | struct aer_broadcast_data *result_data; | 296 | struct aer_broadcast_data *result_data; |
297 | result_data = (struct aer_broadcast_data *) data; | 297 | result_data = (struct aer_broadcast_data *) data; |
298 | 298 | ||
@@ -309,7 +309,7 @@ static int report_slot_reset(struct pci_dev *dev, void *data) | |||
309 | 309 | ||
310 | static int report_resume(struct pci_dev *dev, void *data) | 310 | static int report_resume(struct pci_dev *dev, void *data) |
311 | { | 311 | { |
312 | struct pci_error_handlers *err_handler; | 312 | const struct pci_error_handlers *err_handler; |
313 | 313 | ||
314 | dev->error_state = pci_channel_io_normal; | 314 | dev->error_state = pci_channel_io_normal; |
315 | 315 | ||