aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 14:21:30 -0600
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:52 -0600
commitb2f2ba01b2a4356e92231669f7e3dcee37ac2fca (patch)
treede198efeed37ffb2dd34c8f12f32bcde46dc5ac5 /drivers/usb/gadget
parent26ce4f0684ef4b96d0244ac58b89ec282d5b980c (diff)
downloadkernel_goldelico_gta04-b2f2ba01b2a4356e92231669f7e3dcee37ac2fca.zip
kernel_goldelico_gta04-b2f2ba01b2a4356e92231669f7e3dcee37ac2fca.tar.gz
kernel_goldelico_gta04-b2f2ba01b2a4356e92231669f7e3dcee37ac2fca.tar.bz2
printer gadget: BKL pushdown
Add explicit lock_kernel() calls to printer_open() Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/printer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 76be75e..ec8f2eb 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -462,6 +462,7 @@ printer_open(struct inode *inode, struct file *fd)
unsigned long flags;
int ret = -EBUSY;
+ lock_kernel();
dev = container_of(inode->i_cdev, struct printer_dev, printer_cdev);
spin_lock_irqsave(&dev->lock, flags);
@@ -477,7 +478,7 @@ printer_open(struct inode *inode, struct file *fd)
spin_unlock_irqrestore(&dev->lock, flags);
DBG(dev, "printer_open returned %x\n", ret);
-
+ unlock_kernel();
return ret;
}