diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:11:48 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:03 -0500 |
commit | acfc8cad9135444fdad5385cd9f795fab469a699 (patch) | |
tree | 5218297eb7f14e03e5b4752b9f969902f5af672d | |
parent | d61c5427f652dd89128f1d2b077aebece3c1a884 (diff) |
ncr5380: Remove unused hostdata fields
Remove unused fields from hostdata structs declared with the
NCR5380_implementation_fields macro.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/scsi/dmx3191d.c | 4 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.c | 33 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.h | 3 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.h | 3 |
5 files changed, 4 insertions, 41 deletions
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 4b0dd8c56707..6d534b9ffc91 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
@@ -38,8 +38,8 @@ | |||
38 | #define NCR5380_read(reg) inb(port + reg) | 38 | #define NCR5380_read(reg) inb(port + reg) |
39 | #define NCR5380_write(reg, value) outb(value, port + reg) | 39 | #define NCR5380_write(reg, value) outb(value, port + reg) |
40 | 40 | ||
41 | #define NCR5380_implementation_fields unsigned int port | 41 | #define NCR5380_implementation_fields /* none */ |
42 | #define NCR5380_local_declare() NCR5380_implementation_fields | 42 | #define NCR5380_local_declare() unsigned int port |
43 | #define NCR5380_setup(instance) port = instance->io_port | 43 | #define NCR5380_setup(instance) port = instance->io_port |
44 | 44 | ||
45 | /* | 45 | /* |
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 6a039eb1cbce..dc774959cc20 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
@@ -93,35 +93,6 @@ static volatile unsigned char *mac_scsi_nodrq = NULL; | |||
93 | * NCR 5380 register access functions | 93 | * NCR 5380 register access functions |
94 | */ | 94 | */ |
95 | 95 | ||
96 | #if 0 | ||
97 | /* Debug versions */ | ||
98 | #define CTRL(p,v) (*ctrl = (v)) | ||
99 | |||
100 | static char macscsi_read(struct Scsi_Host *instance, int reg) | ||
101 | { | ||
102 | int iobase = instance->io_port; | ||
103 | int i; | ||
104 | int *ctrl = &((struct NCR5380_hostdata *)instance->hostdata)->ctrl; | ||
105 | |||
106 | CTRL(iobase, 0); | ||
107 | i = in_8(iobase + (reg<<4)); | ||
108 | CTRL(iobase, 0x40); | ||
109 | |||
110 | return i; | ||
111 | } | ||
112 | |||
113 | static void macscsi_write(struct Scsi_Host *instance, int reg, int value) | ||
114 | { | ||
115 | int iobase = instance->io_port; | ||
116 | int *ctrl = &((struct NCR5380_hostdata *)instance->hostdata)->ctrl; | ||
117 | |||
118 | CTRL(iobase, 0); | ||
119 | out_8(iobase + (reg<<4), value); | ||
120 | CTRL(iobase, 0x40); | ||
121 | } | ||
122 | #else | ||
123 | |||
124 | /* Fast versions */ | ||
125 | static __inline__ char macscsi_read(struct Scsi_Host *instance, int reg) | 96 | static __inline__ char macscsi_read(struct Scsi_Host *instance, int reg) |
126 | { | 97 | { |
127 | return in_8(instance->io_port + (reg<<4)); | 98 | return in_8(instance->io_port + (reg<<4)); |
@@ -131,8 +102,6 @@ static __inline__ void macscsi_write(struct Scsi_Host *instance, int reg, int va | |||
131 | { | 102 | { |
132 | out_8(instance->io_port + (reg<<4), value); | 103 | out_8(instance->io_port + (reg<<4), value); |
133 | } | 104 | } |
134 | #endif | ||
135 | |||
136 | 105 | ||
137 | /* | 106 | /* |
138 | * Function : mac_scsi_setup(char *str) | 107 | * Function : mac_scsi_setup(char *str) |
@@ -279,8 +248,6 @@ int __init macscsi_detect(struct scsi_host_template * tpnt) | |||
279 | 248 | ||
280 | instance->n_io_port = 255; | 249 | instance->n_io_port = 255; |
281 | 250 | ||
282 | ((struct NCR5380_hostdata *)instance->hostdata)->ctrl = 0; | ||
283 | |||
284 | if (instance->irq != SCSI_IRQ_NONE) | 251 | if (instance->irq != SCSI_IRQ_NONE) |
285 | if (request_irq(instance->irq, NCR5380_intr, 0, "ncr5380", instance)) { | 252 | if (request_irq(instance->irq, NCR5380_intr, 0, "ncr5380", instance)) { |
286 | printk(KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n", | 253 | printk(KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n", |
diff --git a/drivers/scsi/mac_scsi.h b/drivers/scsi/mac_scsi.h index 06969b06e54b..c86ced5b56db 100644 --- a/drivers/scsi/mac_scsi.h +++ b/drivers/scsi/mac_scsi.h | |||
@@ -47,8 +47,7 @@ | |||
47 | 47 | ||
48 | #include <scsi/scsicam.h> | 48 | #include <scsi/scsicam.h> |
49 | 49 | ||
50 | #define NCR5380_implementation_fields \ | 50 | #define NCR5380_implementation_fields /* none */ |
51 | int port, ctrl | ||
52 | 51 | ||
53 | #define NCR5380_local_declare() \ | 52 | #define NCR5380_local_declare() \ |
54 | struct Scsi_Host *_instance | 53 | struct Scsi_Host *_instance |
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c index 9707b7494a89..cd4bf3a5faaa 100644 --- a/drivers/scsi/sun3_scsi.c +++ b/drivers/scsi/sun3_scsi.c | |||
@@ -313,8 +313,6 @@ static int __init sun3scsi_detect(struct scsi_host_template *tpnt) | |||
313 | 313 | ||
314 | instance->n_io_port = 32; | 314 | instance->n_io_port = 32; |
315 | 315 | ||
316 | ((struct NCR5380_hostdata *)instance->hostdata)->ctrl = 0; | ||
317 | |||
318 | if (request_irq(instance->irq, scsi_sun3_intr, | 316 | if (request_irq(instance->irq, scsi_sun3_intr, |
319 | 0, "Sun3SCSI-5380", instance)) { | 317 | 0, "Sun3SCSI-5380", instance)) { |
320 | #ifndef REAL_DMA | 318 | #ifndef REAL_DMA |
diff --git a/drivers/scsi/sun3_scsi.h b/drivers/scsi/sun3_scsi.h index e96a37cf06ac..848148c16a52 100644 --- a/drivers/scsi/sun3_scsi.h +++ b/drivers/scsi/sun3_scsi.h | |||
@@ -78,8 +78,7 @@ static int sun3scsi_release (struct Scsi_Host *); | |||
78 | #define SUN3_SCSI_NAME "Sun3 NCR5380 SCSI" | 78 | #define SUN3_SCSI_NAME "Sun3 NCR5380 SCSI" |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #define NCR5380_implementation_fields \ | 81 | #define NCR5380_implementation_fields /* none */ |
82 | int port, ctrl | ||
83 | 82 | ||
84 | #define NCR5380_local_declare() \ | 83 | #define NCR5380_local_declare() \ |
85 | struct Scsi_Host *_instance | 84 | struct Scsi_Host *_instance |