diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/main.c')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index bebabec5b448..307dfbbf4a8e 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/cpu.h> | 45 | #include <linux/cpu.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/smp.h> | 47 | #include <linux/smp.h> |
48 | #include <linux/syscore_ops.h> | ||
48 | 49 | ||
49 | #include <asm/processor.h> | 50 | #include <asm/processor.h> |
50 | #include <asm/e820.h> | 51 | #include <asm/e820.h> |
@@ -630,7 +631,7 @@ struct mtrr_value { | |||
630 | 631 | ||
631 | static struct mtrr_value mtrr_value[MTRR_MAX_VAR_RANGES]; | 632 | static struct mtrr_value mtrr_value[MTRR_MAX_VAR_RANGES]; |
632 | 633 | ||
633 | static int mtrr_save(struct sys_device *sysdev, pm_message_t state) | 634 | static int mtrr_save(void) |
634 | { | 635 | { |
635 | int i; | 636 | int i; |
636 | 637 | ||
@@ -642,7 +643,7 @@ static int mtrr_save(struct sys_device *sysdev, pm_message_t state) | |||
642 | return 0; | 643 | return 0; |
643 | } | 644 | } |
644 | 645 | ||
645 | static int mtrr_restore(struct sys_device *sysdev) | 646 | static void mtrr_restore(void) |
646 | { | 647 | { |
647 | int i; | 648 | int i; |
648 | 649 | ||
@@ -653,12 +654,11 @@ static int mtrr_restore(struct sys_device *sysdev) | |||
653 | mtrr_value[i].ltype); | 654 | mtrr_value[i].ltype); |
654 | } | 655 | } |
655 | } | 656 | } |
656 | return 0; | ||
657 | } | 657 | } |
658 | 658 | ||
659 | 659 | ||
660 | 660 | ||
661 | static struct sysdev_driver mtrr_sysdev_driver = { | 661 | static struct syscore_ops mtrr_syscore_ops = { |
662 | .suspend = mtrr_save, | 662 | .suspend = mtrr_save, |
663 | .resume = mtrr_restore, | 663 | .resume = mtrr_restore, |
664 | }; | 664 | }; |
@@ -839,7 +839,7 @@ static int __init mtrr_init_finialize(void) | |||
839 | * TBD: is there any system with such CPU which supports | 839 | * TBD: is there any system with such CPU which supports |
840 | * suspend/resume? If no, we should remove the code. | 840 | * suspend/resume? If no, we should remove the code. |
841 | */ | 841 | */ |
842 | sysdev_driver_register(&cpu_sysdev_class, &mtrr_sysdev_driver); | 842 | register_syscore_ops(&mtrr_syscore_ops); |
843 | 843 | ||
844 | return 0; | 844 | return 0; |
845 | } | 845 | } |