diff options
Diffstat (limited to 'drivers/oprofile/timer_int.c')
| -rw-r--r-- | drivers/oprofile/timer_int.c | 33 | 
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c index 010725117db..61be1d9c16c 100644 --- a/drivers/oprofile/timer_int.c +++ b/drivers/oprofile/timer_int.c @@ -74,8 +74,8 @@ static void oprofile_hrtimer_stop(void)  	put_online_cpus();  } -static int __cpuinit oprofile_cpu_notify(struct notifier_block *self, -					 unsigned long action, void *hcpu) +static int oprofile_cpu_notify(struct notifier_block *self, +			       unsigned long action, void *hcpu)  {  	long cpu = (long) hcpu; @@ -97,23 +97,24 @@ static struct notifier_block __refdata oprofile_cpu_notifier = {  	.notifier_call = oprofile_cpu_notify,  }; -int __init 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"; -	return 0; +	return register_hotcpu_notifier(&oprofile_cpu_notifier);  } -void __exit 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; +}  | 
