aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-10-04 05:15:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:15 -0400
commit1d02a030b01443f1cb81f22750113fe9a98109d9 (patch)
tree641c7fd7e61796535bb0076e7f54ba35d3fecdcc /drivers
parent176f00ffed3ef94a198326fbf6a5db64f1cf73ad (diff)
[PATCH] hisax niccy cleanup
Whitespace cleanup, delete unnecesasry parenthesis and braces. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isdn/hisax/niccy.c223
1 files changed, 109 insertions, 114 deletions
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
index 489022bdef7b..0945336c28da 100644
--- a/drivers/isdn/hisax/niccy.c
+++ b/drivers/isdn/hisax/niccy.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16
17#include <linux/init.h> 16#include <linux/init.h>
18#include "hisax.h" 17#include "hisax.h"
19#include "isac.h" 18#include "isac.h"
@@ -45,33 +44,31 @@ static const char *niccy_revision = "$Revision: 1.21.2.4 $";
45#define PCI_IRQ_DISABLE 0xff0000 44#define PCI_IRQ_DISABLE 0xff0000
46#define PCI_IRQ_ASSERT 0x800000 45#define PCI_IRQ_ASSERT 0x800000
47 46
48static inline u_char 47static inline u_char readreg(unsigned int ale, unsigned int adr, u_char off)
49readreg(unsigned int ale, unsigned int adr, u_char off)
50{ 48{
51 register u_char ret; 49 register u_char ret;
52 50
53 byteout(ale, off); 51 byteout(ale, off);
54 ret = bytein(adr); 52 ret = bytein(adr);
55 return (ret); 53 return ret;
56} 54}
57 55
58static inline void 56static inline void readfifo(unsigned int ale, unsigned int adr, u_char off,
59readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) 57 u_char *data, int size)
60{ 58{
61 byteout(ale, off); 59 byteout(ale, off);
62 insb(adr, data, size); 60 insb(adr, data, size);
63} 61}
64 62
65 63static inline void writereg(unsigned int ale, unsigned int adr, u_char off,
66static inline void 64 u_char data)
67writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
68{ 65{
69 byteout(ale, off); 66 byteout(ale, off);
70 byteout(adr, data); 67 byteout(adr, data);
71} 68}
72 69
73static inline void 70static inline void writefifo(unsigned int ale, unsigned int adr, u_char off,
74writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) 71 u_char *data, int size)
75{ 72{
76 byteout(ale, off); 73 byteout(ale, off);
77 outsb(adr, data, size); 74 outsb(adr, data, size);
@@ -79,39 +76,34 @@ writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int siz
79 76
80/* Interface functions */ 77/* Interface functions */
81 78
82static u_char 79static u_char ReadISAC(struct IsdnCardState *cs, u_char offset)
83ReadISAC(struct IsdnCardState *cs, u_char offset)
84{ 80{
85 return (readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset)); 81 return readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset);
86} 82}
87 83
88static void 84static void WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
89WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
90{ 85{
91 writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset, value); 86 writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset, value);
92} 87}
93 88
94static void 89static void ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
95ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
96{ 90{
97 readfifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); 91 readfifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size);
98} 92}
99 93
100static void 94static void WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
101WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
102{ 95{
103 writefifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); 96 writefifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size);
104} 97}
105 98
106static u_char 99static u_char ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
107ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
108{ 100{
109 return (readreg(cs->hw.niccy.hscx_ale, 101 return readreg(cs->hw.niccy.hscx_ale,
110 cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0))); 102 cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0));
111} 103}
112 104
113static void 105static void WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset,
114WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) 106 u_char value)
115{ 107{
116 writereg(cs->hw.niccy.hscx_ale, 108 writereg(cs->hw.niccy.hscx_ale,
117 cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0), value); 109 cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0), value);
@@ -130,8 +122,8 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
130 122
131#include "hscx_irq.c" 123#include "hscx_irq.c"
132 124
133static irqreturn_t 125static irqreturn_t niccy_interrupt(int intno, void *dev_id,
134niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs) 126 struct pt_regs *regs)
135{ 127{
136 struct IsdnCardState *cs = dev_id; 128 struct IsdnCardState *cs = dev_id;
137 u_char val; 129 u_char val;
@@ -141,21 +133,23 @@ niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs)
141 if (cs->subtyp == NICCY_PCI) { 133 if (cs->subtyp == NICCY_PCI) {
142 int ival; 134 int ival;
143 ival = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); 135 ival = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
144 if (!(ival & PCI_IRQ_ASSERT)) { /* IRQ not for us (shared) */ 136 if (!(ival & PCI_IRQ_ASSERT)) { /* IRQ not for us (shared) */
145 spin_unlock_irqrestore(&cs->lock, flags); 137 spin_unlock_irqrestore(&cs->lock, flags);
146 return IRQ_NONE; 138 return IRQ_NONE;
147 } 139 }
148 outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); 140 outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
149 } 141 }
150 val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_ISTA + 0x40); 142 val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx,
151 Start_HSCX: 143 HSCX_ISTA + 0x40);
144Start_HSCX:
152 if (val) 145 if (val)
153 hscx_int_main(cs, val); 146 hscx_int_main(cs, val);
154 val = readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_ISTA); 147 val = readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_ISTA);
155 Start_ISAC: 148Start_ISAC:
156 if (val) 149 if (val)
157 isac_interrupt(cs, val); 150 isac_interrupt(cs, val);
158 val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_ISTA + 0x40); 151 val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx,
152 HSCX_ISTA + 0x40);
159 if (val) { 153 if (val) {
160 if (cs->debug & L1_DEB_HSCX) 154 if (cs->debug & L1_DEB_HSCX)
161 debugl1(cs, "HSCX IntStat after IntRoutine"); 155 debugl1(cs, "HSCX IntStat after IntRoutine");
@@ -168,21 +162,21 @@ niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs)
168 goto Start_ISAC; 162 goto Start_ISAC;
169 } 163 }
170 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0xFF); 164 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0xFF);
171 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0xFF); 165 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40,
166 0xFF);
172 writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0xFF); 167 writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0xFF);
173 writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0); 168 writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0);
174 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0); 169 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0);
175 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0); 170 writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40,0);
176 spin_unlock_irqrestore(&cs->lock, flags); 171 spin_unlock_irqrestore(&cs->lock, flags);
177 return IRQ_HANDLED; 172 return IRQ_HANDLED;
178} 173}
179 174
180static void 175static void release_io_niccy(struct IsdnCardState *cs)
181release_io_niccy(struct IsdnCardState *cs)
182{ 176{
183 if (cs->subtyp == NICCY_PCI) { 177 if (cs->subtyp == NICCY_PCI) {
184 int val; 178 int val;
185 179
186 val = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); 180 val = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
187 val &= PCI_IRQ_DISABLE; 181 val &= PCI_IRQ_DISABLE;
188 outl(val, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); 182 outl(val, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
@@ -194,8 +188,7 @@ release_io_niccy(struct IsdnCardState *cs)
194 } 188 }
195} 189}
196 190
197static void 191static void niccy_reset(struct IsdnCardState *cs)
198niccy_reset(struct IsdnCardState *cs)
199{ 192{
200 if (cs->subtyp == NICCY_PCI) { 193 if (cs->subtyp == NICCY_PCI) {
201 int val; 194 int val;
@@ -207,29 +200,28 @@ niccy_reset(struct IsdnCardState *cs)
207 inithscxisac(cs, 3); 200 inithscxisac(cs, 3);
208} 201}
209 202
210static int 203static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
211niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
212{ 204{
213 u_long flags; 205 u_long flags;
214 206
215 switch (mt) { 207 switch (mt) {
216 case CARD_RESET: 208 case CARD_RESET:
217 spin_lock_irqsave(&cs->lock, flags); 209 spin_lock_irqsave(&cs->lock, flags);
218 niccy_reset(cs); 210 niccy_reset(cs);
219 spin_unlock_irqrestore(&cs->lock, flags); 211 spin_unlock_irqrestore(&cs->lock, flags);
220 return(0); 212 return 0;
221 case CARD_RELEASE: 213 case CARD_RELEASE:
222 release_io_niccy(cs); 214 release_io_niccy(cs);
223 return(0); 215 return 0;
224 case CARD_INIT: 216 case CARD_INIT:
225 spin_lock_irqsave(&cs->lock, flags); 217 spin_lock_irqsave(&cs->lock, flags);
226 niccy_reset(cs); 218 niccy_reset(cs);
227 spin_unlock_irqrestore(&cs->lock, flags); 219 spin_unlock_irqrestore(&cs->lock, flags);
228 return(0); 220 return 0;
229 case CARD_TEST: 221 case CARD_TEST:
230 return(0); 222 return 0;
231 } 223 }
232 return(0); 224 return 0;
233} 225}
234 226
235static struct pci_dev *niccy_dev __devinitdata = NULL; 227static struct pci_dev *niccy_dev __devinitdata = NULL;
@@ -237,8 +229,7 @@ static struct pci_dev *niccy_dev __devinitdata = NULL;
237static struct pnp_card *pnp_c __devinitdata = NULL; 229static struct pnp_card *pnp_c __devinitdata = NULL;
238#endif 230#endif
239 231
240int __devinit 232int __devinit setup_niccy(struct IsdnCard *card)
241setup_niccy(struct IsdnCard *card)
242{ 233{
243 struct IsdnCardState *cs = card->cs; 234 struct IsdnCardState *cs = card->cs;
244 char tmp[64]; 235 char tmp[64];
@@ -246,40 +237,44 @@ setup_niccy(struct IsdnCard *card)
246 strcpy(tmp, niccy_revision); 237 strcpy(tmp, niccy_revision);
247 printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp)); 238 printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp));
248 if (cs->typ != ISDN_CTYPE_NICCY) 239 if (cs->typ != ISDN_CTYPE_NICCY)
249 return (0); 240 return 0;
250#ifdef __ISAPNP__ 241#ifdef __ISAPNP__
251 if (!card->para[1] && isapnp_present()) { 242 if (!card->para[1] && isapnp_present()) {
252 struct pnp_dev *pnp_d = NULL; 243 struct pnp_dev *pnp_d = NULL;
253 int err; 244 int err;
254 245
255 if ((pnp_c = pnp_find_card( 246 pnp_c = pnp_find_card(ISAPNP_VENDOR('S', 'D', 'A'),
256 ISAPNP_VENDOR('S', 'D', 'A'), 247 ISAPNP_FUNCTION(0x0150), pnp_c);
257 ISAPNP_FUNCTION(0x0150), pnp_c))) { 248 if (pnp_c) {
258 if (!(pnp_d = pnp_find_dev(pnp_c, 249 pnp_d = pnp_find_dev(pnp_c,
259 ISAPNP_VENDOR('S', 'D', 'A'), 250 ISAPNP_VENDOR('S', 'D', 'A'),
260 ISAPNP_FUNCTION(0x0150), pnp_d))) { 251 ISAPNP_FUNCTION(0x0150), pnp_d);
261 printk(KERN_ERR "NiccyPnP: PnP error card found, no device\n"); 252 if (!pnp_d) {
262 return (0); 253 printk(KERN_ERR "NiccyPnP: PnP error card "
254 "found, no device\n");
255 return 0;
263 } 256 }
264 pnp_disable_dev(pnp_d); 257 pnp_disable_dev(pnp_d);
265 err = pnp_activate_dev(pnp_d); 258 err = pnp_activate_dev(pnp_d);
266 if (err<0) { 259 if (err < 0) {
267 printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", 260 printk(KERN_WARNING "%s: pnp_activate_dev "
268 __FUNCTION__, err); 261 "ret(%d)\n", __FUNCTION__, err);
269 return(0); 262 return 0;
270 } 263 }
271 card->para[1] = pnp_port_start(pnp_d, 0); 264 card->para[1] = pnp_port_start(pnp_d, 0);
272 card->para[2] = pnp_port_start(pnp_d, 1); 265 card->para[2] = pnp_port_start(pnp_d, 1);
273 card->para[0] = pnp_irq(pnp_d, 0); 266 card->para[0] = pnp_irq(pnp_d, 0);
274 if (!card->para[0] || !card->para[1] || !card->para[2]) { 267 if (!card->para[0] || !card->para[1] ||
275 printk(KERN_ERR "NiccyPnP:some resources are missing %ld/%lx/%lx\n", 268 !card->para[2]) {
276 card->para[0], card->para[1], card->para[2]); 269 printk(KERN_ERR "NiccyPnP:some resources are "
270 "missing %ld/%lx/%lx\n",
271 card->para[0], card->para[1],
272 card->para[2]);
277 pnp_disable_dev(pnp_d); 273 pnp_disable_dev(pnp_d);
278 return(0); 274 return 0;
279 } 275 }
280 } else { 276 } else
281 printk(KERN_INFO "NiccyPnP: no ISAPnP card found\n"); 277 printk(KERN_INFO "NiccyPnP: no ISAPnP card found\n");
282 }
283 } 278 }
284#endif 279#endif
285 if (card->para[1]) { 280 if (card->para[1]) {
@@ -291,50 +286,51 @@ setup_niccy(struct IsdnCard *card)
291 cs->subtyp = NICCY_PNP; 286 cs->subtyp = NICCY_PNP;
292 cs->irq = card->para[0]; 287 cs->irq = card->para[0];
293 if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) { 288 if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) {
294 printk(KERN_WARNING 289 printk(KERN_WARNING "HiSax: %s data port %x-%x "
295 "HiSax: %s data port %x-%x already in use\n", 290 "already in use\n", CardType[card->typ],
296 CardType[card->typ], 291 cs->hw.niccy.isac, cs->hw.niccy.isac + 1);
297 cs->hw.niccy.isac, 292 return 0;
298 cs->hw.niccy.isac + 1);
299 return (0);
300 } 293 }
301 if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) { 294 if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) {
302 printk(KERN_WARNING 295 printk(KERN_WARNING "HiSax: %s address port %x-%x "
303 "HiSax: %s address port %x-%x already in use\n", 296 "already in use\n", CardType[card->typ],
304 CardType[card->typ],
305 cs->hw.niccy.isac_ale, 297 cs->hw.niccy.isac_ale,
306 cs->hw.niccy.isac_ale + 1); 298 cs->hw.niccy.isac_ale + 1);
307 release_region(cs->hw.niccy.isac, 2); 299 release_region(cs->hw.niccy.isac, 2);
308 return (0); 300 return 0;
309 } 301 }
310 } else { 302 } else {
311#ifdef CONFIG_PCI 303#ifdef CONFIG_PCI
312 u_int pci_ioaddr; 304 u_int pci_ioaddr;
313 cs->subtyp = 0; 305 cs->subtyp = 0;
314 if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, 306 if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM,
315 PCI_DEVICE_ID_SATSAGEM_NICCY, niccy_dev))) { 307 PCI_DEVICE_ID_SATSAGEM_NICCY,
308 niccy_dev))) {
316 if (pci_enable_device(niccy_dev)) 309 if (pci_enable_device(niccy_dev))
317 return(0); 310 return 0;
318 /* get IRQ */ 311 /* get IRQ */
319 if (!niccy_dev->irq) { 312 if (!niccy_dev->irq) {
320 printk(KERN_WARNING "Niccy: No IRQ for PCI card found\n"); 313 printk(KERN_WARNING
321 return(0); 314 "Niccy: No IRQ for PCI card found\n");
315 return 0;
322 } 316 }
323 cs->irq = niccy_dev->irq; 317 cs->irq = niccy_dev->irq;
324 cs->hw.niccy.cfg_reg = pci_resource_start(niccy_dev, 0); 318 cs->hw.niccy.cfg_reg = pci_resource_start(niccy_dev, 0);
325 if (!cs->hw.niccy.cfg_reg) { 319 if (!cs->hw.niccy.cfg_reg) {
326 printk(KERN_WARNING "Niccy: No IO-Adr for PCI cfg found\n"); 320 printk(KERN_WARNING
327 return(0); 321 "Niccy: No IO-Adr for PCI cfg found\n");
322 return 0;
328 } 323 }
329 pci_ioaddr = pci_resource_start(niccy_dev, 1); 324 pci_ioaddr = pci_resource_start(niccy_dev, 1);
330 if (!pci_ioaddr) { 325 if (!pci_ioaddr) {
331 printk(KERN_WARNING "Niccy: No IO-Adr for PCI card found\n"); 326 printk(KERN_WARNING
332 return(0); 327 "Niccy: No IO-Adr for PCI card found\n");
328 return 0;
333 } 329 }
334 cs->subtyp = NICCY_PCI; 330 cs->subtyp = NICCY_PCI;
335 } else { 331 } else {
336 printk(KERN_WARNING "Niccy: No PCI card found\n"); 332 printk(KERN_WARNING "Niccy: No PCI card found\n");
337 return(0); 333 return 0;
338 } 334 }
339 cs->irq_flags |= IRQF_SHARED; 335 cs->irq_flags |= IRQF_SHARED;
340 cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA; 336 cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA;
@@ -343,29 +339,28 @@ setup_niccy(struct IsdnCard *card)
343 cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR; 339 cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR;
344 if (!request_region(cs->hw.niccy.isac, 4, "niccy")) { 340 if (!request_region(cs->hw.niccy.isac, 4, "niccy")) {
345 printk(KERN_WARNING 341 printk(KERN_WARNING
346 "HiSax: %s data port %x-%x already in use\n", 342 "HiSax: %s data port %x-%x already in use\n",
347 CardType[card->typ], 343 CardType[card->typ],
348 cs->hw.niccy.isac, 344 cs->hw.niccy.isac, cs->hw.niccy.isac + 4);
349 cs->hw.niccy.isac + 4); 345 return 0;
350 return (0);
351 } 346 }
352 if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) { 347 if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) {
353 printk(KERN_WARNING 348 printk(KERN_WARNING
354 "HiSax: %s pci port %x-%x already in use\n", 349 "HiSax: %s pci port %x-%x already in use\n",
355 CardType[card->typ], 350 CardType[card->typ],
356 cs->hw.niccy.cfg_reg, 351 cs->hw.niccy.cfg_reg,
357 cs->hw.niccy.cfg_reg + 0x40); 352 cs->hw.niccy.cfg_reg + 0x40);
358 release_region(cs->hw.niccy.isac, 4); 353 release_region(cs->hw.niccy.isac, 4);
359 return (0); 354 return 0;
360 } 355 }
361#else 356#else
362 printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n"); 357 printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n");
363 printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n"); 358 printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n");
364 return (0); 359 return 0;
365#endif /* CONFIG_PCI */ 360#endif /* CONFIG_PCI */
366 } 361 }
367 printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", 362 printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n",
368 CardType[cs->typ], (cs->subtyp==1) ? "PnP":"PCI", 363 CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI",
369 cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); 364 cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale);
370 setup_isac(cs); 365 setup_isac(cs);
371 cs->readisac = &ReadISAC; 366 cs->readisac = &ReadISAC;
@@ -379,10 +374,10 @@ setup_niccy(struct IsdnCard *card)
379 cs->irq_func = &niccy_interrupt; 374 cs->irq_func = &niccy_interrupt;
380 ISACVersion(cs, "Niccy:"); 375 ISACVersion(cs, "Niccy:");
381 if (HscxVersion(cs, "Niccy:")) { 376 if (HscxVersion(cs, "Niccy:")) {
382 printk(KERN_WARNING 377 printk(KERN_WARNING "Niccy: wrong HSCX versions check IO "
383 "Niccy: wrong HSCX versions check IO address\n"); 378 "address\n");
384 release_io_niccy(cs); 379 release_io_niccy(cs);
385 return (0); 380 return 0;
386 } 381 }
387 return (1); 382 return 1;
388} 383}