Pull thermal into release branch
[linux-drm-fsl-dcu.git] / arch / m68knommu / kernel / ptrace.c
index 382ca5797b97804d28e7a2fcae60d43cd0d9b3d6..f54b6a3dfecb1726a88e5978bd0e6d42fa1f4ddc 100644 (file)
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
-#include <linux/config.h>
 #include <linux/signal.h>
 
 #include <asm/uaccess.h>
@@ -63,7 +61,7 @@ static inline long get_reg(struct task_struct *task, int regno)
 
        if (regno == PT_USP)
                addr = &task->thread.usp;
-       else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+       else if (regno < ARRAY_SIZE(regoff))
                addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
        else
                return 0;
@@ -80,7 +78,7 @@ static inline int put_reg(struct task_struct *task, int regno,
 
        if (regno == PT_USP)
                addr = &task->thread.usp;
-       else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+       else if (regno < ARRAY_SIZE(regoff))
                addr = (unsigned long *) (task->thread.esp0 + regoff[regno]);
        else
                return -1;