From: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton --- arch/mips/kernel/ioctl32.c | 6 ------ arch/mips/sibyte/sb1250/bcm1250_tbprof.c | 13 ++++++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff -puN arch/mips/kernel/ioctl32.c~switch-sibyte-profiling-driver-to-compat_ioctl arch/mips/kernel/ioctl32.c --- 25/arch/mips/kernel/ioctl32.c~switch-sibyte-profiling-driver-to-compat_ioctl Tue Sep 20 15:59:13 2005 +++ 25-akpm/arch/mips/kernel/ioctl32.c Tue Sep 20 15:59:13 2005 @@ -41,12 +41,6 @@ IOCTL_TABLE_START #define DECLARES #include "compat_ioctl.c" -#ifdef CONFIG_SIBYTE_TBPROF -COMPATIBLE_IOCTL(SBPROF_ZBSTART) -COMPATIBLE_IOCTL(SBPROF_ZBSTOP) -COMPATIBLE_IOCTL(SBPROF_ZBWAITFULL) -#endif /* CONFIG_SIBYTE_TBPROF */ - /*HANDLE_IOCTL(RTC_IRQP_READ, w_long) COMPATIBLE_IOCTL(RTC_IRQP_SET) HANDLE_IOCTL(RTC_EPOCH_READ, w_long) diff -puN arch/mips/sibyte/sb1250/bcm1250_tbprof.c~switch-sibyte-profiling-driver-to-compat_ioctl arch/mips/sibyte/sb1250/bcm1250_tbprof.c --- 25/arch/mips/sibyte/sb1250/bcm1250_tbprof.c~switch-sibyte-profiling-driver-to-compat_ioctl Tue Sep 20 15:59:13 2005 +++ 25-akpm/arch/mips/sibyte/sb1250/bcm1250_tbprof.c Tue Sep 20 16:00:00 2005 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -333,13 +334,13 @@ static ssize_t sbprof_tb_read(struct fil return count; } -static int sbprof_tb_ioctl(struct inode *inode, - struct file *filp, - unsigned int command, - unsigned long arg) +static long sbprof_tb_ioctl(struct file *filp, + unsigned int command, + unsigned long arg) { int error = 0; + lock_kernel(); switch (command) { case SBPROF_ZBSTART: error = sbprof_zbprof_start(filp); @@ -355,6 +356,7 @@ static int sbprof_tb_ioctl(struct inode error = -EINVAL; break; } + unlock_kernel(); return error; } @@ -364,7 +366,8 @@ static struct file_operations sbprof_tb_ .open = sbprof_tb_open, .release = sbprof_tb_release, .read = sbprof_tb_read, - .ioctl = sbprof_tb_ioctl, + .unlocked_ioctl = sbprof_tb_ioctl, + .comapt_ioctl = sbprof_tb_ioctl, .mmap = NULL, }; _