summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.de>2012-08-18 21:20:39 +0200
committerJames Bottomley <JBottomley@Parallels.com>2012-09-14 18:59:28 +0200
commit6c648d95a6af4a79241a916871df17c84c68ea20 (patch)
tree9c658ea5964dea1ecdb029ce955587d17bea6d03 /drivers/scsi/st.h
parent[SCSI] st: clean up dev cleanup in st_probe (diff)
downloadlinux-6c648d95a6af4a79241a916871df17c84c68ea20.tar.xz
linux-6c648d95a6af4a79241a916871df17c84c68ea20.zip
[SCSI] st: get rid of scsi_tapes array
st currently allocates an array to store pointers to all of the scsi_tape objects. It's used to discover available indexes to use as the base for the minor number selection and later to look up scsi_tape devices for character devices. We switch to using an IDR for minor selection and a pointer from st_modedef back to scsi_tape for the lookups. Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Jeff Mahoney <jeffm@suse.com> Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/st.h')
-rw-r--r--drivers/scsi/st.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index b548923785ed..8a23640981c8 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -66,6 +66,7 @@ struct st_modedef {
unsigned char default_compression; /* 0 = don't touch, etc */
short default_density; /* Forced density, -1 = no value */
int default_blksize; /* Forced blocksize, -1 = no value */
+ struct scsi_tape *tape;
struct cdev *cdevs[2]; /* Auto-rewind and non-rewind devices */
};
@@ -99,6 +100,7 @@ struct scsi_tape {
struct mutex lock; /* For serialization */
struct completion wait; /* For SCSI commands */
struct st_buffer *buffer;
+ int index;
/* Drive characteristics */
unsigned char omit_blklims;