From 86266452f80545285c14e20a8024f79c4fb88a86 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 13 Jan 2010 15:33:15 +0100 Subject: USB: Push BKL on open down into the drivers Straightforward push into the drivers to allow auditing individual drivers separately Signed-off-by: Oliver Neukum Acked-by: Mauro Carvalho Chehab Cc: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usb-skeleton.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb/usb-skeleton.c') diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index 61522787f39c..e94176bfd272 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -90,6 +91,7 @@ static int skel_open(struct inode *inode, struct file *file) int subminor; int retval = 0; + lock_kernel(); subminor = iminor(inode); interface = usb_find_interface(&skel_driver, subminor); @@ -135,6 +137,7 @@ static int skel_open(struct inode *inode, struct file *file) mutex_unlock(&dev->io_mutex); exit: + unlock_kernel(); return retval; } -- cgit v1.2.3