Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277272
b: refs/heads/master
c: 75c43a2
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter committed Nov 4, 2011
1 parent 1f522cf commit ad3aef5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 159a80b2142df709416ab369113de7d511c48331
refs/heads/master: 75c43a20b220f885c39ffa7cdbbb1191e257a9a9
8 changes: 2 additions & 6 deletions trunk/drivers/oprofile/oprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}

Expand Down
30 changes: 15 additions & 15 deletions trunk/drivers/oprofile/timer_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,24 @@ static struct notifier_block __refdata oprofile_cpu_notifier = {
.notifier_call = oprofile_cpu_notify,
};

int oprofile_timer_init(struct oprofile_operations *ops)
static int oprofile_hrtimer_setup(void)
{
int rc;

rc = register_hotcpu_notifier(&oprofile_cpu_notifier);
if (rc)
return rc;
ops->create_files = NULL;
ops->setup = NULL;
ops->shutdown = NULL;
ops->start = oprofile_hrtimer_start;
ops->stop = oprofile_hrtimer_stop;
ops->cpu_type = "timer";
printk(KERN_INFO "oprofile: using timer interrupt.\n");
return 0;
return register_hotcpu_notifier(&oprofile_cpu_notifier);
}

void oprofile_timer_exit(void)
static void oprofile_hrtimer_shutdown(void)
{
unregister_hotcpu_notifier(&oprofile_cpu_notifier);
}

int oprofile_timer_init(struct oprofile_operations *ops)
{
ops->create_files = NULL;
ops->setup = oprofile_hrtimer_setup;
ops->shutdown = oprofile_hrtimer_shutdown;
ops->start = oprofile_hrtimer_start;
ops->stop = oprofile_hrtimer_stop;
ops->cpu_type = "timer";
printk(KERN_INFO "oprofile: using timer interrupt.\n");
return 0;
}

0 comments on commit ad3aef5

Please sign in to comment.