aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/oprof.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oprofile/oprof.c')
-rw-r--r--drivers/oprofile/oprof.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index b4a6857..f9bda64 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -225,26 +225,17 @@ post_sync:
mutex_unlock(&start_mutex);
}
-int oprofile_set_backtrace(unsigned long val)
+int oprofile_set_ulong(unsigned long *addr, unsigned long val)
{
- int err = 0;
+ int err = -EBUSY;
mutex_lock(&start_mutex);
-
- if (oprofile_started) {
- err = -EBUSY;
- goto out;
+ if (!oprofile_started) {
+ *addr = val;
+ err = 0;
}
-
- if (!oprofile_ops.backtrace) {
- err = -EINVAL;
- goto out;
- }
-
- oprofile_backtrace_depth = val;
-
-out:
mutex_unlock(&start_mutex);
+
return err;
}