switch sibyte profiling driver to ->compat_ioctl
PATCH 1/1 switch sibyte profiling driver to ->compat_ioctl
arch/mips/kernel/ioctl32.c +0 -6
@@ -41,12 +41,6 @@#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)
arch/mips/sibyte/sb1250/bcm1250_tbprof.c +8 -5
@@ -28,6 +28,7 @@#include <linux/fs.h> #include <linux/errno.h> #include <linux/reboot.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/io.h> #include <asm/sibyte/sb1250.h>
@@ -333,13 +334,13 @@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 @@ error = -EINVAL ;break ; } +unlock_kernel ();return error; }
@@ -364,7 +366,8 @@ .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, };
arch/mips/sibyte/sb1250/bcm1250_tbprof.c line 370
Quoted 9 lines · Christoph Hellwig
arch/mips/sibyte/sb1250/bcm1250_tbprof.c +2
-1@@ -364,7 +366,8 @@ .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,
^^^^^^^^^^^^
arch/mips/sibyte/sb1250/bcm1250_tbprof.c line 372
Quoted 2 lines
arch/mips/sibyte/sb1250/bcm1250_tbprof.c +0
-0.mmap = NULL, };
DISCLAIMER: I didn't check whether the spelling error is in the struct definition as well.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 11 lines · Geert Uytterhoeven
arch/mips/sibyte/sb1250/bcm1250_tbprof.c line 370
Quoted 9 lines · Christoph Hellwig
arch/mips/sibyte/sb1250/bcm1250_tbprof.c +2
-1@@ -364,7 +366,8 @@ .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,^^^^^^^^^^^^
Quoted 5 lines
arch/mips/sibyte/sb1250/bcm1250_tbprof.c line 372
Quoted 2 lines
arch/mips/sibyte/sb1250/bcm1250_tbprof.c +0
-0.mmap = NULL, };DISCLAIMER: I didn't check whether the spelling error is in the struct definition as well.
no, it's not. thanks for catching it :)
Ralf Baechle
AppliedOn Mon, Sep 19, 2005 at 05:08:22PM +0200, Christoph Hellwig wrote:
Thanks, applied.
Ralf