ChangeSet 1.1254.8.1, 2003/05/30 12:58:33-07:00, [EMAIL PROTECTED]
[PATCH] USB: replaced BKL in rio500.c
drivers/usb/misc/rio500.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff -Nru a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
--- a/drivers/usb/misc/rio500.c Mon Jun 2 11:20:35 2003
+++ b/drivers/usb/misc/rio500.c Mon Jun 2 11:20:35 2003
@@ -23,6 +23,9 @@
*
* Based upon mouse.c (Brad Keryan) and printer.c (Michael Gee).
*
+ * Changelog:
+ * 30/05/2003 replaced lock/unlock kernel with up/down
+ * Daniele Bellucci [EMAIL PROTECTED]
* */
#include <linux/module.h>
@@ -75,17 +78,17 @@
{
struct rio_usb_data *rio = &rio_instance;
- lock_kernel();
+ down(&(rio->lock));
if (rio->isopen || !rio->present) {
- unlock_kernel();
+ up(&(rio->lock));
return -EBUSY;
}
rio->isopen = 1;
init_waitqueue_head(&rio->wait_q);
- unlock_kernel();
+ up(&(rio->lock));
info("Rio opened.");
@@ -460,7 +463,6 @@
return -ENOMEM;
}
- rio->present = 1;
rio->rio_dev = dev;
if (!(rio->obuf = (char *) kmalloc(OBUF_SIZE, GFP_KERNEL))) {
@@ -481,6 +483,8 @@
init_MUTEX(&(rio->lock));
usb_set_intfdata (intf, rio);
+ rio->present = 1;
+
return 0;
}
@@ -525,7 +529,7 @@
.id_table = rio_table,
};
-int usb_rio_init(void)
+static int __init usb_rio_init(void)
{
if (usb_register(&rio_driver) < 0)
return -1;
@@ -536,7 +540,7 @@
}
-void usb_rio_cleanup(void)
+static void __exit usb_rio_cleanup(void)
{
struct rio_usb_data *rio = &rio_instance;
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel