*/
static int sh7750_timer_notify(struct notifier_block *self,
- unsigned long val, void *data)
+ unsigned long val, void *regs)
{
- struct pt_regs *regs = data;
- unsigned long pc;
-
- pc = instruction_pointer(regs);
- oprofile_add_sample(pc, !user_mode(regs), 0, smp_processor_id());
-
+ oprofile_add_sample((struct pt_regs *)regs, 0);
return 0;
}
*/
static inline int to_counter(struct file *file)
{
- const unsigned char *name = file->f_dentry->d_parent->d_name.name;
+ const unsigned char *name = file->f_path.dentry->d_parent->d_name.name;
return (int)simple_strtol(name, NULL, 10);
}
for (i = 0; i < NR_CNTRS; i++) {
struct dentry *dir;
- char buf[3];
+ char buf[4];
snprintf(buf, sizeof(buf), "%d", i);
dir = oprofilefs_mkdir(sb, root, buf);