patch-2.4.0-test4 linux/drivers/scsi/st.c
Next file: linux/drivers/sgi/char/ds1286.c
Previous file: linux/drivers/scsi/sgiwd93.h
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Wed Jul 12 21:58:43 2000
- Orig file:
v2.4.0-test3/linux/drivers/scsi/st.c
- Orig date:
Mon Jul 10 16:47:24 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/scsi/st.c linux/drivers/scsi/st.c
@@ -31,6 +31,7 @@
#include <linux/ioctl.h>
#include <linux/fcntl.h>
#include <linux/spinlock.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/system.h>
@@ -620,8 +621,6 @@
if (STp->device->host->hostt->module)
__MOD_INC_USE_COUNT(STp->device->host->hostt->module);
- if (st_template.module)
- __MOD_INC_USE_COUNT(st_template.module);
if (mode != STp->current_mode) {
DEBC(printk(ST_DEB_MSG "st%d: Mode change from %d to %d.\n",
@@ -859,8 +858,6 @@
STp->in_use = 0;
if (STp->device->host->hostt->module)
__MOD_DEC_USE_COUNT(STp->device->host->hostt->module);
- if (st_template.module)
- __MOD_DEC_USE_COUNT(st_template.module);
return retval;
}
@@ -995,6 +992,7 @@
int dev;
dev = TAPE_NR(devt);
+ lock_kernel();
read_lock(&st_dev_arr_lock);
STp = scsi_tapes[dev];
read_unlock(&st_dev_arr_lock);
@@ -1010,8 +1008,7 @@
STp->in_use = 0;
if (STp->device->host->hostt->module)
__MOD_DEC_USE_COUNT(STp->device->host->hostt->module);
- if (st_template.module)
- __MOD_DEC_USE_COUNT(st_template.module);
+ unlock_kernel();
return result;
}
@@ -3428,6 +3425,7 @@
static struct file_operations st_fops =
{
+ owner: THIS_MODULE,
read: st_read,
write: st_write,
ioctl: st_ioctl,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)