diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 11:48:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 11:48:58 -0500 |
commit | 7f5b09c15ab989ed5ce4adda0be42c1302df70b7 (patch) | |
tree | 9695b00983d1bd077ff91c463abcb136330cf344 /drivers/media | |
parent | 94468080220162f74dc6ce5c3e95e5fec8022902 (diff) | |
parent | cedf8a78421943441b9011ce7bcdab55f07d2ea6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (220 commits)
USB: backlight, appledisplay: fix incomplete registration failure handling
USB: pl2303: remove unnecessary reset of usb_device in urbs
USB: ftdi_sio: remove obsolete check in unthrottle
USB: ftdi_sio: remove unused tx_bytes counter
USB: qcaux: driver for auxiliary serial ports on Qualcomm devices
USB: pl2303: initial TIOCGSERIAL support
USB: option: add Longcheer/Longsung vendor ID
USB: fix I2C API usage in ohci-pnx4008.
USB: usbmon: mask seconds properly in text API
USB: sisusbvga: no unnecessary GFP_ATOMIC
USB: storage: onetouch: unnecessary GFP_ATOMIC
USB: serial: ftdi: add CONTEC vendor and product id
USB: remove references to port->port.count from the serial drivers
USB: tty: Prune uses of tty_request_room in the USB layer
USB: tty: Add a function to insert a string of characters with the same flag
USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration()
USB: tty: kill request_room for USB ACM class
USB: tty: sort out the request_room handling for whiteheat
USB: storage: fix misplaced parenthesis
USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices and spectrometers
...
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/dabusb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c index 9b413a35e048..0f505086774c 100644 --- a/drivers/media/video/dabusb.c +++ b/drivers/media/video/dabusb.c | |||
@@ -616,10 +616,12 @@ static int dabusb_open (struct inode *inode, struct file *file) | |||
616 | { | 616 | { |
617 | int devnum = iminor(inode); | 617 | int devnum = iminor(inode); |
618 | pdabusb_t s; | 618 | pdabusb_t s; |
619 | int r; | ||
619 | 620 | ||
620 | if (devnum < DABUSB_MINOR || devnum >= (DABUSB_MINOR + NRDABUSB)) | 621 | if (devnum < DABUSB_MINOR || devnum >= (DABUSB_MINOR + NRDABUSB)) |
621 | return -EIO; | 622 | return -EIO; |
622 | 623 | ||
624 | lock_kernel(); | ||
623 | s = &dabusb[devnum - DABUSB_MINOR]; | 625 | s = &dabusb[devnum - DABUSB_MINOR]; |
624 | 626 | ||
625 | dbg("dabusb_open"); | 627 | dbg("dabusb_open"); |
@@ -634,6 +636,7 @@ static int dabusb_open (struct inode *inode, struct file *file) | |||
634 | msleep_interruptible(500); | 636 | msleep_interruptible(500); |
635 | 637 | ||
636 | if (signal_pending (current)) { | 638 | if (signal_pending (current)) { |
639 | unlock_kernel(); | ||
637 | return -EAGAIN; | 640 | return -EAGAIN; |
638 | } | 641 | } |
639 | mutex_lock(&s->mutex); | 642 | mutex_lock(&s->mutex); |
@@ -641,6 +644,7 @@ static int dabusb_open (struct inode *inode, struct file *file) | |||
641 | if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) { | 644 | if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) { |
642 | mutex_unlock(&s->mutex); | 645 | mutex_unlock(&s->mutex); |
643 | dev_err(&s->usbdev->dev, "set_interface failed\n"); | 646 | dev_err(&s->usbdev->dev, "set_interface failed\n"); |
647 | unlock_kernel(); | ||
644 | return -EINVAL; | 648 | return -EINVAL; |
645 | } | 649 | } |
646 | s->opened = 1; | 650 | s->opened = 1; |
@@ -649,7 +653,9 @@ static int dabusb_open (struct inode *inode, struct file *file) | |||
649 | file->f_pos = 0; | 653 | file->f_pos = 0; |
650 | file->private_data = s; | 654 | file->private_data = s; |
651 | 655 | ||
652 | return nonseekable_open(inode, file); | 656 | r = nonseekable_open(inode, file); |
657 | unlock_kernel(); | ||
658 | return r; | ||
653 | } | 659 | } |
654 | 660 | ||
655 | static int dabusb_release (struct inode *inode, struct file *file) | 661 | static int dabusb_release (struct inode *inode, struct file *file) |