projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26ce4f0
)
printer gadget: BKL pushdown
author
Jonathan Corbet
<corbet@lwn.net>
Fri, 16 May 2008 20:21:30 +0000
(14:21 -0600)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:52 +0000
(14:05 -0600)
Add explicit lock_kernel() calls to printer_open()
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/usb/gadget/printer.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/printer.c
b/drivers/usb/gadget/printer.c
index 76be75e3ab8fe4a051240b8c37e7f15c8558edba..ec8f2eb041ca97b258e4ae3a45700b0305f6caf1 100644
(file)
--- 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;
}