Skip to content

Commit

Permalink
ixj: push BKL into driver and wrap ioctls
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <[email protected]>
Cc: Nishanth Aravamudan <[email protected]>
Cc: Domen Puncer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alan-Cox authored and torvalds committed Jul 25, 2008
1 parent 11af747 commit e05e9f7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions drivers/telephony/ixj.c
Original file line number Diff line number Diff line change
Expand Up @@ -6095,15 +6095,15 @@ static int capabilities_check(IXJ *j, struct phone_capability *pcreq)
return retval;
}

static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd, unsigned long arg)
static long do_ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long arg)
{
IXJ_TONE ti;
IXJ_FILTER jf;
IXJ_FILTER_RAW jfr;
void __user *argp = (void __user *)arg;

unsigned int raise, mant;
struct inode *inode = file_p->f_path.dentry->d_inode;
unsigned int minor = iminor(inode);
unsigned int raise, mant;
int board = NUM(inode);

IXJ *j = get_ixj(NUM(inode));
Expand Down Expand Up @@ -6661,6 +6661,15 @@ static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd,
return retval;
}

static long ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long arg)
{
long ret;
lock_kernel();
ret = do_ixj_ioctl(file_p, cmd, arg);
unlock_kernel();
return ret;
}

static int ixj_fasync(int fd, struct file *file_p, int mode)
{
IXJ *j = get_ixj(NUM(file_p->f_path.dentry->d_inode));
Expand All @@ -6674,7 +6683,7 @@ static const struct file_operations ixj_fops =
.read = ixj_enhanced_read,
.write = ixj_enhanced_write,
.poll = ixj_poll,
.ioctl = ixj_ioctl,
.unlocked_ioctl = ixj_ioctl,
.release = ixj_release,
.fasync = ixj_fasync
};
Expand Down

0 comments on commit e05e9f7

Please sign in to comment.