From 6c648d95a6af4a79241a916871df17c84c68ea20 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Sat, 18 Aug 2012 15:20:39 -0400 Subject: [SCSI] st: get rid of scsi_tapes array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jeff Mahoney Acked-by: Kai Mäkisara Signed-off-by: James Bottomley --- drivers/scsi/st.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/scsi/st.h') diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h index b548923785e..8a23640981c 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; -- cgit v1.2.3