Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207975
b: refs/heads/master
c: 3b759c7
h: refs/heads/master
i:
  207973: c85f4a6
  207971: 0e68d61
  207967: 162b4a6
v: v3
  • Loading branch information
Arnd Bergmann authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent d5a213a commit 9e8bcfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1548b13b75a2ec06f46220004e91c37818be6c18
refs/heads/master: 3b759c75febd8f9ce91a05705ec43eb7f4b5ed3d
22 changes: 2 additions & 20 deletions trunk/drivers/usb/mon/mon_bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,17 +646,14 @@ static int mon_bin_open(struct inode *inode, struct file *file)
size_t size;
int rc;

lock_kernel();
mutex_lock(&mon_lock);
if ((mbus = mon_bus_lookup(iminor(inode))) == NULL) {
mutex_unlock(&mon_lock);
unlock_kernel();
return -ENODEV;
}
if (mbus != &mon_bus0 && mbus->u_bus == NULL) {
printk(KERN_ERR TAG ": consistency error on open\n");
mutex_unlock(&mon_lock);
unlock_kernel();
return -ENODEV;
}

Expand Down Expand Up @@ -689,7 +686,6 @@ static int mon_bin_open(struct inode *inode, struct file *file)

file->private_data = rp;
mutex_unlock(&mon_lock);
unlock_kernel();
return 0;

err_allocbuff:
Expand All @@ -698,7 +694,6 @@ static int mon_bin_open(struct inode *inode, struct file *file)
kfree(rp);
err_alloc:
mutex_unlock(&mon_lock);
unlock_kernel();
return rc;
}

Expand Down Expand Up @@ -954,7 +949,7 @@ static int mon_bin_queued(struct mon_reader_bin *rp)

/*
*/
static int mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct mon_reader_bin *rp = file->private_data;
// struct mon_bus* mbus = rp->r.m_bus;
Expand Down Expand Up @@ -1094,19 +1089,6 @@ static int mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return ret;
}

static long mon_bin_unlocked_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
int ret;

lock_kernel();
ret = mon_bin_ioctl(file, cmd, arg);
unlock_kernel();

return ret;
}


#ifdef CONFIG_COMPAT
static long mon_bin_compat_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
Expand Down Expand Up @@ -1250,7 +1232,7 @@ static const struct file_operations mon_fops_binary = {
.read = mon_bin_read,
/* .write = mon_text_write, */
.poll = mon_bin_poll,
.unlocked_ioctl = mon_bin_unlocked_ioctl,
.unlocked_ioctl = mon_bin_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = mon_bin_compat_ioctl,
#endif
Expand Down

0 comments on commit 9e8bcfe

Please sign in to comment.