Commit d3654227 authored by Kai Mäkisara's avatar Kai Mäkisara Committed by Jens Axboe

[PATCH] SCSI tape: remove remaining typedefs

This patch augments Christoph Hellwig's earlier patch by converting the local
typedefs to struct definitions. One debugging printk format is also fixed. The
patch is against 2.6.10-rc1, compiles and has been tested.
Signed-off-by: default avatarKai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 11be501a
This diff is collapsed.
......@@ -6,7 +6,7 @@
/* The tape buffer descriptor. */
typedef struct {
struct st_buffer {
unsigned char in_use;
unsigned char dma; /* DMA-able buffer */
unsigned char do_dio; /* direct i/o set up? */
......@@ -26,7 +26,7 @@ typedef struct {
unsigned int frp_sg_current; /* driver buffer length currently in s/g list */
struct st_buf_fragment *frp; /* the allocated buffer fragment list */
struct scatterlist sg[1]; /* MUST BE last item */
} ST_buffer;
};
/* The tape buffer fragment descriptor */
struct st_buf_fragment {
......@@ -35,7 +35,7 @@ struct st_buf_fragment {
};
/* The tape mode definition */
typedef struct {
struct st_modedef {
unsigned char defined;
unsigned char sysv; /* SYS V semantics? */
unsigned char do_async_writes;
......@@ -46,7 +46,7 @@ typedef struct {
short default_density; /* Forced density, -1 = no value */
int default_blksize; /* Forced blocksize, -1 = no value */
struct cdev *cdevs[2]; /* Auto-rewind and non-rewind devices */
} ST_mode;
};
/* Number of modes can be changed by changing ST_NBR_MODE_BITS. The maximum
number of modes is 16 (ST_NBR_MODE_BITS 4) */
......@@ -59,7 +59,7 @@ typedef struct {
#define ST_MAX_TAPE_ENTRIES (ST_MAX_TAPES << (ST_NBR_MODE_BITS + 1))
/* The status related to each partition */
typedef struct {
struct st_partstat {
unsigned char rw;
unsigned char eof;
unsigned char at_sm;
......@@ -72,12 +72,12 @@ typedef struct {
#define ST_NBR_PARTITIONS 4
/* The tape drive descriptor */
typedef struct {
struct scsi_tape {
struct scsi_driver *driver;
struct scsi_device *device;
struct semaphore lock; /* For serialization */
struct completion wait; /* For SCSI commands */
ST_buffer *buffer;
struct st_buffer *buffer;
/* Drive characteristics */
unsigned char omit_blklims;
......@@ -103,14 +103,14 @@ typedef struct {
unsigned long max_pfn; /* the maximum page number reachable by the HBA */
/* Mode characteristics */
ST_mode modes[ST_NBR_MODES];
struct st_modedef modes[ST_NBR_MODES];
int current_mode;
/* Status variables */
int partition;
int new_partition;
int nbr_partitions; /* zero until partition support enabled */
ST_partstat ps[ST_NBR_PARTITIONS];
struct st_partstat ps[ST_NBR_PARTITIONS];
unsigned char dirty;
unsigned char ready;
unsigned char write_prot;
......@@ -144,7 +144,7 @@ typedef struct {
unsigned char last_sense[16];
#endif
struct gendisk *disk;
} Scsi_Tape;
};
/* Bit masks for use_pf */
#define USE_PF 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment