diff options
Diffstat (limited to 'drivers/xen/xen-acpi-processor.c')
| -rw-r--r-- | drivers/xen/xen-acpi-processor.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index 7231859119f1..82358d14ecf1 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c | |||
| @@ -27,10 +27,10 @@ | |||
| 27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
| 28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
| 29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
| 30 | #include <linux/syscore_ops.h> | ||
| 31 | #include <linux/acpi.h> | 30 | #include <linux/acpi.h> |
| 32 | #include <acpi/processor.h> | 31 | #include <acpi/processor.h> |
| 33 | #include <xen/xen.h> | 32 | #include <xen/xen.h> |
| 33 | #include <xen/xen-ops.h> | ||
| 34 | #include <xen/interface/platform.h> | 34 | #include <xen/interface/platform.h> |
| 35 | #include <asm/xen/hypercall.h> | 35 | #include <asm/xen/hypercall.h> |
| 36 | 36 | ||
| @@ -495,14 +495,15 @@ static int xen_upload_processor_pm_data(void) | |||
| 495 | return rc; | 495 | return rc; |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | static void xen_acpi_processor_resume(void) | 498 | static int xen_acpi_processor_resume(struct notifier_block *nb, |
| 499 | unsigned long action, void *data) | ||
| 499 | { | 500 | { |
| 500 | bitmap_zero(acpi_ids_done, nr_acpi_bits); | 501 | bitmap_zero(acpi_ids_done, nr_acpi_bits); |
| 501 | xen_upload_processor_pm_data(); | 502 | return xen_upload_processor_pm_data(); |
| 502 | } | 503 | } |
| 503 | 504 | ||
| 504 | static struct syscore_ops xap_syscore_ops = { | 505 | struct notifier_block xen_acpi_processor_resume_nb = { |
| 505 | .resume = xen_acpi_processor_resume, | 506 | .notifier_call = xen_acpi_processor_resume, |
| 506 | }; | 507 | }; |
| 507 | 508 | ||
| 508 | static int __init xen_acpi_processor_init(void) | 509 | static int __init xen_acpi_processor_init(void) |
| @@ -555,7 +556,7 @@ static int __init xen_acpi_processor_init(void) | |||
| 555 | if (rc) | 556 | if (rc) |
| 556 | goto err_unregister; | 557 | goto err_unregister; |
| 557 | 558 | ||
| 558 | register_syscore_ops(&xap_syscore_ops); | 559 | xen_resume_notifier_register(&xen_acpi_processor_resume_nb); |
| 559 | 560 | ||
| 560 | return 0; | 561 | return 0; |
| 561 | err_unregister: | 562 | err_unregister: |
| @@ -574,7 +575,7 @@ static void __exit xen_acpi_processor_exit(void) | |||
| 574 | { | 575 | { |
| 575 | int i; | 576 | int i; |
| 576 | 577 | ||
| 577 | unregister_syscore_ops(&xap_syscore_ops); | 578 | xen_resume_notifier_unregister(&xen_acpi_processor_resume_nb); |
| 578 | kfree(acpi_ids_done); | 579 | kfree(acpi_ids_done); |
| 579 | kfree(acpi_id_present); | 580 | kfree(acpi_id_present); |
| 580 | kfree(acpi_id_cst_present); | 581 | kfree(acpi_id_cst_present); |
