Commit b288f135 authored by Ralf Baechle's avatar Ralf Baechle

Switch Sibyte profiling driver to ->compat_ioctl

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent ea3d710f
...@@ -41,12 +41,6 @@ IOCTL_TABLE_START ...@@ -41,12 +41,6 @@ IOCTL_TABLE_START
#define DECLARES #define DECLARES
#include "compat_ioctl.c" #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) /*HANDLE_IOCTL(RTC_IRQP_READ, w_long)
COMPATIBLE_IOCTL(RTC_IRQP_SET) COMPATIBLE_IOCTL(RTC_IRQP_SET)
HANDLE_IOCTL(RTC_EPOCH_READ, w_long) HANDLE_IOCTL(RTC_EPOCH_READ, w_long)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/smp_lock.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -343,13 +344,13 @@ static ssize_t sbprof_tb_read(struct file *filp, char *buf, ...@@ -343,13 +344,13 @@ static ssize_t sbprof_tb_read(struct file *filp, char *buf,
return count; return count;
} }
static int sbprof_tb_ioctl(struct inode *inode, static long sbprof_tb_ioctl(struct file *filp,
struct file *filp,
unsigned int command, unsigned int command,
unsigned long arg) unsigned long arg)
{ {
int error = 0; int error = 0;
lock_kernel();
switch (command) { switch (command) {
case SBPROF_ZBSTART: case SBPROF_ZBSTART:
error = sbprof_zbprof_start(filp); error = sbprof_zbprof_start(filp);
...@@ -368,6 +369,7 @@ static int sbprof_tb_ioctl(struct inode *inode, ...@@ -368,6 +369,7 @@ static int sbprof_tb_ioctl(struct inode *inode,
error = -EINVAL; error = -EINVAL;
break; break;
} }
unlock_kernel();
return error; return error;
} }
...@@ -377,7 +379,8 @@ static struct file_operations sbprof_tb_fops = { ...@@ -377,7 +379,8 @@ static struct file_operations sbprof_tb_fops = {
.open = sbprof_tb_open, .open = sbprof_tb_open,
.release = sbprof_tb_release, .release = sbprof_tb_release,
.read = sbprof_tb_read, .read = sbprof_tb_read,
.ioctl = sbprof_tb_ioctl, .unlocked_ioctl = sbprof_tb_ioctl,
.compat_ioctl = sbprof_tb_ioctl,
.mmap = NULL, .mmap = NULL,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment