diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-09-01 16:31:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-09-01 16:31:07 -0400 |
commit | b4c69d45c4c0d7480e9df183ebda62148984af25 (patch) | |
tree | b93b7a249779fdde22bc6639ad878335afaaf4c0 /arch | |
parent | 68d3f1d810500e8b975bdf0b20dd83d060076b4b (diff) | |
parent | 269f45c25028c75fe10e6d9be86e7202ab461fbc (diff) |
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/urgent
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index f6b48f6c5951..cfe4faabb0f6 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -568,8 +568,13 @@ static int __init init_sysfs(void) | |||
568 | int error; | 568 | int error; |
569 | 569 | ||
570 | error = sysdev_class_register(&oprofile_sysclass); | 570 | error = sysdev_class_register(&oprofile_sysclass); |
571 | if (!error) | 571 | if (error) |
572 | error = sysdev_register(&device_oprofile); | 572 | return error; |
573 | |||
574 | error = sysdev_register(&device_oprofile); | ||
575 | if (error) | ||
576 | sysdev_class_unregister(&oprofile_sysclass); | ||
577 | |||
573 | return error; | 578 | return error; |
574 | } | 579 | } |
575 | 580 | ||
@@ -580,8 +585,10 @@ static void exit_sysfs(void) | |||
580 | } | 585 | } |
581 | 586 | ||
582 | #else | 587 | #else |
583 | #define init_sysfs() do { } while (0) | 588 | |
584 | #define exit_sysfs() do { } while (0) | 589 | static inline int init_sysfs(void) { return 0; } |
590 | static inline void exit_sysfs(void) { } | ||
591 | |||
585 | #endif /* CONFIG_PM */ | 592 | #endif /* CONFIG_PM */ |
586 | 593 | ||
587 | static int __init p4_init(char **cpu_type) | 594 | static int __init p4_init(char **cpu_type) |
@@ -695,6 +702,8 @@ int __init op_nmi_init(struct oprofile_operations *ops) | |||
695 | char *cpu_type = NULL; | 702 | char *cpu_type = NULL; |
696 | int ret = 0; | 703 | int ret = 0; |
697 | 704 | ||
705 | using_nmi = 0; | ||
706 | |||
698 | if (!cpu_has_apic) | 707 | if (!cpu_has_apic) |
699 | return -ENODEV; | 708 | return -ENODEV; |
700 | 709 | ||
@@ -774,7 +783,10 @@ int __init op_nmi_init(struct oprofile_operations *ops) | |||
774 | 783 | ||
775 | mux_init(ops); | 784 | mux_init(ops); |
776 | 785 | ||
777 | init_sysfs(); | 786 | ret = init_sysfs(); |
787 | if (ret) | ||
788 | return ret; | ||
789 | |||
778 | using_nmi = 1; | 790 | using_nmi = 1; |
779 | printk(KERN_INFO "oprofile: using NMI interrupt.\n"); | 791 | printk(KERN_INFO "oprofile: using NMI interrupt.\n"); |
780 | return 0; | 792 | return 0; |