summaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/oprof.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2011-10-14 15:46:10 +0200
committerRobert Richter <robert.richter@amd.com>2011-11-04 15:04:35 +0100
commit75c43a20b220f885c39ffa7cdbbb1191e257a9a9 (patch)
treea623847b0235f618438b03785b4860a80e0d4b1b /drivers/oprofile/oprof.c
parentoprofile, x86: Add kernel parameter oprofile.cpu_type=timer (diff)
downloadlinux-75c43a20b220f885c39ffa7cdbbb1191e257a9a9.tar.xz
linux-75c43a20b220f885c39ffa7cdbbb1191e257a9a9.zip
oprofile: Remove exit function for timer mode
Remove exit functions by moving init/exit code to oprofile's setup/ shutdown functions. Doing so the oprofile module exit code will be easier and less error-prone. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers/oprofile/oprof.c')
-rw-r--r--drivers/oprofile/oprof.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index f8c752e408a6..f7cd06967aed 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -262,9 +262,7 @@ static int __init oprofile_init(void)
return 0;
/* failed */
- if (timer_mode)
- oprofile_timer_exit();
- else
+ if (!timer_mode)
oprofile_arch_exit();
return err;
@@ -274,9 +272,7 @@ static int __init oprofile_init(void)
static void __exit oprofile_exit(void)
{
oprofilefs_unregister();
- if (timer_mode)
- oprofile_timer_exit();
- else
+ if (!timer_mode)
oprofile_arch_exit();
}