git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'syscore' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspen...
[pandora-kernel.git]
/
arch
/
x86
/
oprofile
/
nmi_int.c
diff --git
a/arch/x86/oprofile/nmi_int.c
b/arch/x86/oprofile/nmi_int.c
index
e2b7b0c
..
8dace18
100644
(file)
--- a/
arch/x86/oprofile/nmi_int.c
+++ b/
arch/x86/oprofile/nmi_int.c
@@
-15,7
+15,7
@@
#include <linux/notifier.h>
#include <linux/smp.h>
#include <linux/oprofile.h>
#include <linux/notifier.h>
#include <linux/smp.h>
#include <linux/oprofile.h>
-#include <linux/sys
dev
.h>
+#include <linux/sys
core_ops
.h>
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <linux/kdebug.h>
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <linux/kdebug.h>
@@
-536,7
+536,7
@@
static void nmi_shutdown(void)
#ifdef CONFIG_PM
#ifdef CONFIG_PM
-static int nmi_suspend(
struct sys_device *dev, pm_message_t state
)
+static int nmi_suspend(
void
)
{
/* Only one CPU left, just stop that one */
if (nmi_enabled == 1)
{
/* Only one CPU left, just stop that one */
if (nmi_enabled == 1)
@@
-544,49
+544,31
@@
static int nmi_suspend(struct sys_device *dev, pm_message_t state)
return 0;
}
return 0;
}
-static
int nmi_resume(struct sys_device *dev
)
+static
void nmi_resume(void
)
{
if (nmi_enabled == 1)
nmi_cpu_start(NULL);
{
if (nmi_enabled == 1)
nmi_cpu_start(NULL);
- return 0;
}
}
-static struct sysdev_class oprofile_sysclass = {
- .name = "oprofile",
+static struct syscore_ops oprofile_syscore_ops = {
.resume = nmi_resume,
.suspend = nmi_suspend,
};
.resume = nmi_resume,
.suspend = nmi_suspend,
};
-static struct sys_device device_oprofile = {
- .id = 0,
- .cls = &oprofile_sysclass,
-};
-
-static int __init init_sysfs(void)
+static void __init init_suspend_resume(void)
{
{
- int error;
-
- error = sysdev_class_register(&oprofile_sysclass);
- if (error)
- return error;
-
- error = sysdev_register(&device_oprofile);
- if (error)
- sysdev_class_unregister(&oprofile_sysclass);
-
- return error;
+ register_syscore_ops(&oprofile_syscore_ops);
}
}
-static void exit_s
ysfs
(void)
+static void exit_s
uspend_resume
(void)
{
{
- sysdev_unregister(&device_oprofile);
- sysdev_class_unregister(&oprofile_sysclass);
+ unregister_syscore_ops(&oprofile_syscore_ops);
}
#else
}
#else
-static inline
int init_sysfs(void) { return 0;
}
-static inline void exit_s
ysfs
(void) { }
+static inline
void init_suspend_resume(void) {
}
+static inline void exit_s
uspend_resume
(void) { }
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */
@@
-789,9
+771,7
@@
int __init op_nmi_init(struct oprofile_operations *ops)
mux_init(ops);
mux_init(ops);
- ret = init_sysfs();
- if (ret)
- return ret;
+ init_suspend_resume();
printk(KERN_INFO "oprofile: using NMI interrupt.\n");
return 0;
printk(KERN_INFO "oprofile: using NMI interrupt.\n");
return 0;
@@
-799,5
+779,5
@@
int __init op_nmi_init(struct oprofile_operations *ops)
void op_nmi_exit(void)
{
void op_nmi_exit(void)
{
- exit_s
ysfs
();
+ exit_s
uspend_resume
();
}
}