Hi,
I noticed that the USB scanner module is still using the Linux 2.2
module locking scheme. Here is a patch to make it use the v2.4 scheme.
Cheers,
Chris
--- linux-2.4.17/drivers/usb/scanner.c.orig Sat Dec 22 00:10:06 2001
+++ linux-2.4.17/drivers/usb/scanner.c Sat Dec 22 00:13:14 2001
@@ -369,8 +369,6 @@
int err=0;
- MOD_INC_USE_COUNT;
-
down(&scn_mutex);
scn_minor = USB_SCN_MINOR(inode);
@@ -379,7 +377,6 @@
if (!p_scn_table[scn_minor]) {
up(&scn_mutex);
- MOD_DEC_USE_COUNT;
err("open_scanner(%d): Unable to access minor data", scn_minor);
return -ENODEV;
}
@@ -421,9 +418,6 @@
up(&(scn->sem)); /* Wake up any possible contending processes */
- if (err)
- MOD_DEC_USE_COUNT;
-
return err;
}
@@ -454,8 +448,6 @@
up(&scn_mutex);
up(&(scn->sem));
- MOD_DEC_USE_COUNT;
-
return 0;
}
@@ -793,6 +785,7 @@
static struct
file_operations usb_scanner_fops = {
+ owner: THIS_MODULE,
read: read_scanner,
write: write_scanner,
ioctl: ioctl_scanner,
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel