aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7770_osm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-05-16 12:52:06 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 16:54:36 -0400
commitdedd831081052028f35aaf924ea3d6c55109074f (patch)
tree518497bc7e5aa491bc932d50149ce96cae0b26c3 /drivers/scsi/aic7xxx/aic7770_osm.c
parentc06716fe1cea97749668c83e8374b453fbd00823 (diff)
[SCSI] aic7xxx: remove Linux 2.4 ifdefs
There's not much sense in sharing code anymore now that aic7xxx uses various transport class facilities. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7770_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7770_osm.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c
index c2b47f2bdffd..682ca0b32b44 100644
--- a/drivers/scsi/aic7xxx/aic7770_osm.c
+++ b/drivers/scsi/aic7xxx/aic7770_osm.c
@@ -41,7 +41,6 @@
41 41
42#include "aic7xxx_osm.h" 42#include "aic7xxx_osm.h"
43 43
44#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
45#include <linux/device.h> 44#include <linux/device.h>
46#include <linux/eisa.h> 45#include <linux/eisa.h>
47 46
@@ -62,13 +61,6 @@ static struct eisa_driver aic7770_driver = {
62}; 61};
63 62
64typedef struct device *aic7770_dev_t; 63typedef struct device *aic7770_dev_t;
65#else
66#define MINSLOT 1
67#define NUMSLOTS 16
68#define IDOFFSET 0x80
69
70typedef void *aic7770_dev_t;
71#endif
72 64
73static int aic7770_linux_config(struct aic7770_identity *entry, 65static int aic7770_linux_config(struct aic7770_identity *entry,
74 aic7770_dev_t dev, u_int eisaBase); 66 aic7770_dev_t dev, u_int eisaBase);
@@ -76,7 +68,6 @@ static int aic7770_linux_config(struct aic7770_identity *entry,
76int 68int
77ahc_linux_eisa_init(void) 69ahc_linux_eisa_init(void)
78{ 70{
79#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
80 struct eisa_device_id *eid; 71 struct eisa_device_id *eid;
81 struct aic7770_identity *id; 72 struct aic7770_identity *id;
82 int i; 73 int i;
@@ -110,44 +101,6 @@ ahc_linux_eisa_init(void)
110 eid->sig[0] = 0; 101 eid->sig[0] = 0;
111 102
112 return eisa_driver_register(&aic7770_driver); 103 return eisa_driver_register(&aic7770_driver);
113#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
114 struct aic7770_identity *entry;
115 u_int slot;
116 u_int eisaBase;
117 u_int i;
118 int ret = -ENODEV;
119
120 if (aic7xxx_probe_eisa_vl == 0)
121 return ret;
122
123 eisaBase = 0x1000 + AHC_EISA_SLOT_OFFSET;
124 for (slot = 1; slot < NUMSLOTS; eisaBase+=0x1000, slot++) {
125 uint32_t eisa_id;
126 size_t id_size;
127
128 if (request_region(eisaBase, AHC_EISA_IOSIZE, "aic7xxx") == 0)
129 continue;
130
131 eisa_id = 0;
132 id_size = sizeof(eisa_id);
133 for (i = 0; i < 4; i++) {
134 /* VLcards require priming*/
135 outb(0x80 + i, eisaBase + IDOFFSET);
136 eisa_id |= inb(eisaBase + IDOFFSET + i)
137 << ((id_size-i-1) * 8);
138 }
139 release_region(eisaBase, AHC_EISA_IOSIZE);
140 if (eisa_id & 0x80000000)
141 continue; /* no EISA card in slot */
142
143 entry = aic7770_find_device(eisa_id);
144 if (entry != NULL) {
145 aic7770_linux_config(entry, NULL, eisaBase);
146 ret = 0;
147 }
148 }
149 return ret;
150#endif
151} 104}
152 105
153void 106void
@@ -187,11 +140,10 @@ aic7770_linux_config(struct aic7770_identity *entry, aic7770_dev_t dev,
187 ahc_free(ahc); 140 ahc_free(ahc);
188 return (error); 141 return (error);
189 } 142 }
190#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) 143
191 dev->driver_data = (void *)ahc; 144 dev->driver_data = (void *)ahc;
192 if (aic7xxx_detect_complete) 145 if (aic7xxx_detect_complete)
193 error = ahc_linux_register_host(ahc, &aic7xxx_driver_template); 146 error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
194#endif
195 return (error); 147 return (error);
196} 148}
197 149
@@ -225,7 +177,6 @@ aic7770_map_int(struct ahc_softc *ahc, u_int irq)
225 return (-error); 177 return (-error);
226} 178}
227 179
228#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
229static int 180static int
230aic7770_eisa_dev_probe(struct device *dev) 181aic7770_eisa_dev_probe(struct device *dev)
231{ 182{
@@ -261,4 +212,3 @@ aic7770_eisa_dev_remove(struct device *dev)
261 212
262 return (0); 213 return (0);
263} 214}
264#endif