diff options
Diffstat (limited to 'drivers/usb/misc/sisusbvga/sisusb.c')
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index aae95a0..30d9303 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -47,7 +47,6 @@ #include <linux/spinlock.h> #include <linux/kref.h> #include <linux/usb.h> -#include <linux/smp_lock.h> #include <linux/vmalloc.h> #include "sisusb.h" @@ -2416,14 +2415,11 @@ sisusb_open(struct inode *inode, struct file *file) struct usb_interface *interface; int subminor = iminor(inode); - lock_kernel(); if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { - unlock_kernel(); return -ENODEV; } if (!(sisusb = usb_get_intfdata(interface))) { - unlock_kernel(); return -ENODEV; } @@ -2431,13 +2427,11 @@ sisusb_open(struct inode *inode, struct file *file) if (!sisusb->present || !sisusb->ready) { mutex_unlock(&sisusb->lock); - unlock_kernel(); return -ENODEV; } if (sisusb->isopen) { mutex_unlock(&sisusb->lock); - unlock_kernel(); return -EBUSY; } @@ -2446,13 +2440,11 @@ sisusb_open(struct inode *inode, struct file *file) if (sisusb_init_gfxdevice(sisusb, 0)) { mutex_unlock(&sisusb->lock); dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n"); - unlock_kernel(); return -EIO; } } else { mutex_unlock(&sisusb->lock); dev_err(&sisusb->sisusb_dev->dev, "Device not attached to USB 2.0 hub\n"); - unlock_kernel(); return -EIO; } } @@ -2465,7 +2457,6 @@ sisusb_open(struct inode *inode, struct file *file) file->private_data = sisusb; mutex_unlock(&sisusb->lock); - unlock_kernel(); return 0; } @@ -2974,13 +2965,12 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) struct sisusb_usb_data *sisusb; struct sisusb_info x; struct sisusb_command y; - int retval = 0; + long retval = 0; u32 __user *argp = (u32 __user *)arg; if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) return -ENODEV; - lock_kernel(); mutex_lock(&sisusb->lock); /* Sanity check */ @@ -3039,7 +3029,6 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) err_out: mutex_unlock(&sisusb->lock); - unlock_kernel(); return retval; } |