summaryrefslogtreecommitdiff
path: root/drivers/scsi/st.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.de>2012-08-18 15:20:39 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-14 17:59:28 +0100
commit6c648d95a6af4a79241a916871df17c84c68ea20 (patch)
tree9c658ea5964dea1ecdb029ce955587d17bea6d03 /drivers/scsi/st.h
parente3f2a9cc84d35fac73c906de57ad3b3f5ff82008 (diff)
[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;