aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/asuscom.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-19 22:52:38 -0500
committerJoe Perches <joe@perches.com>2012-02-21 12:04:01 -0500
commit475be4d85a274d0961593db41cf85689db1d583c (patch)
treeb2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hisax/asuscom.c
parent0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff)
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style. Update the coding style used on a per-line basis so that git diff -w shows only elided blank lines at EOF. Done with emacs and some scripts and some typing. Built x86 allyesconfig. No detected change in objdump -d or size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/hisax/asuscom.c')
-rw-r--r--drivers/isdn/hisax/asuscom.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c
index 1f879b500d83..2b74a40ad2a0 100644
--- a/drivers/isdn/hisax/asuscom.c
+++ b/drivers/isdn/hisax/asuscom.c
@@ -22,7 +22,7 @@
22 22
23static const char *Asuscom_revision = "$Revision: 1.14.2.4 $"; 23static const char *Asuscom_revision = "$Revision: 1.14.2.4 $";
24 24
25#define byteout(addr,val) outb(val,addr) 25#define byteout(addr, val) outb(val, addr)
26#define bytein(addr) inb(addr) 26#define bytein(addr) inb(addr)
27 27
28#define ASUS_ISAC 0 28#define ASUS_ISAC 0
@@ -51,7 +51,7 @@ readreg(unsigned int ale, unsigned int adr, u_char off)
51} 51}
52 52
53static inline void 53static inline void
54readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) 54readfifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size)
55{ 55{
56 byteout(ale, off); 56 byteout(ale, off);
57 insb(adr, data, size); 57 insb(adr, data, size);
@@ -66,7 +66,7 @@ writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
66} 66}
67 67
68static inline void 68static inline void
69writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) 69writefifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size)
70{ 70{
71 byteout(ale, off); 71 byteout(ale, off);
72 outsb(adr, data, size); 72 outsb(adr, data, size);
@@ -87,13 +87,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
87} 87}
88 88
89static void 89static void
90ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) 90ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size)
91{ 91{
92 readfifo(cs->hw.asus.adr, cs->hw.asus.isac, 0, data, size); 92 readfifo(cs->hw.asus.adr, cs->hw.asus.isac, 0, data, size);
93} 93}
94 94
95static void 95static void
96WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) 96WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size)
97{ 97{
98 writefifo(cs->hw.asus.adr, cs->hw.asus.isac, 0, data, size); 98 writefifo(cs->hw.asus.adr, cs->hw.asus.isac, 0, data, size);
99} 99}
@@ -101,23 +101,23 @@ WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
101static u_char 101static u_char
102ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset) 102ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
103{ 103{
104 return (readreg(cs->hw.asus.adr, cs->hw.asus.isac, offset|0x80)); 104 return (readreg(cs->hw.asus.adr, cs->hw.asus.isac, offset | 0x80));
105} 105}
106 106
107static void 107static void
108WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value) 108WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
109{ 109{
110 writereg(cs->hw.asus.adr, cs->hw.asus.isac, offset|0x80, value); 110 writereg(cs->hw.asus.adr, cs->hw.asus.isac, offset | 0x80, value);
111} 111}
112 112
113static void 113static void
114ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size) 114ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char *data, int size)
115{ 115{
116 readfifo(cs->hw.asus.adr, cs->hw.asus.isac, 0x80, data, size); 116 readfifo(cs->hw.asus.adr, cs->hw.asus.isac, 0x80, data, size);
117} 117}
118 118
119static void 119static void
120WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size) 120WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char *data, int size)
121{ 121{
122 writefifo(cs->hw.asus.adr, cs->hw.asus.isac, 0x80, data, size); 122 writefifo(cs->hw.asus.adr, cs->hw.asus.isac, 0x80, data, size);
123} 123}
@@ -140,16 +140,16 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
140 * fast interrupt HSCX stuff goes here 140 * fast interrupt HSCX stuff goes here
141 */ 141 */
142 142
143#define READHSCX(cs, nr, reg) readreg(cs->hw.asus.adr, \ 143#define READHSCX(cs, nr, reg) readreg(cs->hw.asus.adr, \
144 cs->hw.asus.hscx, reg + (nr ? 0x40 : 0)) 144 cs->hw.asus.hscx, reg + (nr ? 0x40 : 0))
145#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.asus.adr, \ 145#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.asus.adr, \
146 cs->hw.asus.hscx, reg + (nr ? 0x40 : 0), data) 146 cs->hw.asus.hscx, reg + (nr ? 0x40 : 0), data)
147 147
148#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.asus.adr, \ 148#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.asus.adr, \
149 cs->hw.asus.hscx, (nr ? 0x40 : 0), ptr, cnt) 149 cs->hw.asus.hscx, (nr ? 0x40 : 0), ptr, cnt)
150 150
151#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.asus.adr, \ 151#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.asus.adr, \
152 cs->hw.asus.hscx, (nr ? 0x40 : 0), ptr, cnt) 152 cs->hw.asus.hscx, (nr ? 0x40 : 0), ptr, cnt)
153 153
154#include "hscx_irq.c" 154#include "hscx_irq.c"
155 155
@@ -162,11 +162,11 @@ asuscom_interrupt(int intno, void *dev_id)
162 162
163 spin_lock_irqsave(&cs->lock, flags); 163 spin_lock_irqsave(&cs->lock, flags);
164 val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40); 164 val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40);
165 Start_HSCX: 165Start_HSCX:
166 if (val) 166 if (val)
167 hscx_int_main(cs, val); 167 hscx_int_main(cs, val);
168 val = readreg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_ISTA); 168 val = readreg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_ISTA);
169 Start_ISAC: 169Start_ISAC:
170 if (val) 170 if (val)
171 isac_interrupt(cs, val); 171 isac_interrupt(cs, val);
172 val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40); 172 val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40);
@@ -274,39 +274,39 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg)
274 u_long flags; 274 u_long flags;
275 275
276 switch (mt) { 276 switch (mt) {
277 case CARD_RESET: 277 case CARD_RESET:
278 spin_lock_irqsave(&cs->lock, flags); 278 spin_lock_irqsave(&cs->lock, flags);
279 reset_asuscom(cs); 279 reset_asuscom(cs);
280 spin_unlock_irqrestore(&cs->lock, flags); 280 spin_unlock_irqrestore(&cs->lock, flags);
281 return(0); 281 return (0);
282 case CARD_RELEASE: 282 case CARD_RELEASE:
283 release_io_asuscom(cs); 283 release_io_asuscom(cs);
284 return(0); 284 return (0);
285 case CARD_INIT: 285 case CARD_INIT:
286 spin_lock_irqsave(&cs->lock, flags); 286 spin_lock_irqsave(&cs->lock, flags);
287 cs->debug |= L1_DEB_IPAC; 287 cs->debug |= L1_DEB_IPAC;
288 inithscxisac(cs, 3); 288 inithscxisac(cs, 3);
289 spin_unlock_irqrestore(&cs->lock, flags); 289 spin_unlock_irqrestore(&cs->lock, flags);
290 return(0); 290 return (0);
291 case CARD_TEST: 291 case CARD_TEST:
292 return(0); 292 return (0);
293 } 293 }
294 return(0); 294 return (0);
295} 295}
296 296
297#ifdef __ISAPNP__ 297#ifdef __ISAPNP__
298static struct isapnp_device_id asus_ids[] __devinitdata = { 298static struct isapnp_device_id asus_ids[] __devinitdata = {
299 { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), 299 { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
300 ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), 300 ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
301 (unsigned long) "Asus1688 PnP" }, 301 (unsigned long) "Asus1688 PnP" },
302 { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1690), 302 { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1690),
303 ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1690), 303 ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1690),
304 (unsigned long) "Asus1690 PnP" }, 304 (unsigned long) "Asus1690 PnP" },
305 { ISAPNP_VENDOR('S', 'I', 'E'), ISAPNP_FUNCTION(0x0020), 305 { ISAPNP_VENDOR('S', 'I', 'E'), ISAPNP_FUNCTION(0x0020),
306 ISAPNP_VENDOR('S', 'I', 'E'), ISAPNP_FUNCTION(0x0020), 306 ISAPNP_VENDOR('S', 'I', 'E'), ISAPNP_FUNCTION(0x0020),
307 (unsigned long) "Isurf2 PnP" }, 307 (unsigned long) "Isurf2 PnP" },
308 { ISAPNP_VENDOR('E', 'L', 'F'), ISAPNP_FUNCTION(0x0000), 308 { ISAPNP_VENDOR('E', 'L', 'F'), ISAPNP_FUNCTION(0x0000),
309 ISAPNP_VENDOR('E', 'L', 'F'), ISAPNP_FUNCTION(0x0000), 309 ISAPNP_VENDOR('E', 'L', 'F'), ISAPNP_FUNCTION(0x0000),
310 (unsigned long) "Iscas TE320" }, 310 (unsigned long) "Iscas TE320" },
311 { 0, } 311 { 0, }
312}; 312};
@@ -330,30 +330,30 @@ setup_asuscom(struct IsdnCard *card)
330#ifdef __ISAPNP__ 330#ifdef __ISAPNP__
331 if (!card->para[1] && isapnp_present()) { 331 if (!card->para[1] && isapnp_present()) {
332 struct pnp_dev *pnp_d; 332 struct pnp_dev *pnp_d;
333 while(ipid->card_vendor) { 333 while (ipid->card_vendor) {
334 if ((pnp_c = pnp_find_card(ipid->card_vendor, 334 if ((pnp_c = pnp_find_card(ipid->card_vendor,
335 ipid->card_device, pnp_c))) { 335 ipid->card_device, pnp_c))) {
336 pnp_d = NULL; 336 pnp_d = NULL;
337 if ((pnp_d = pnp_find_dev(pnp_c, 337 if ((pnp_d = pnp_find_dev(pnp_c,
338 ipid->vendor, ipid->function, pnp_d))) { 338 ipid->vendor, ipid->function, pnp_d))) {
339 int err; 339 int err;
340 340
341 printk(KERN_INFO "HiSax: %s detected\n", 341 printk(KERN_INFO "HiSax: %s detected\n",
342 (char *)ipid->driver_data); 342 (char *)ipid->driver_data);
343 pnp_disable_dev(pnp_d); 343 pnp_disable_dev(pnp_d);
344 err = pnp_activate_dev(pnp_d); 344 err = pnp_activate_dev(pnp_d);
345 if (err<0) { 345 if (err < 0) {
346 printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", 346 printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n",
347 __func__, err); 347 __func__, err);
348 return(0); 348 return (0);
349 } 349 }
350 card->para[1] = pnp_port_start(pnp_d, 0); 350 card->para[1] = pnp_port_start(pnp_d, 0);
351 card->para[0] = pnp_irq(pnp_d, 0); 351 card->para[0] = pnp_irq(pnp_d, 0);
352 if (!card->para[0] || !card->para[1]) { 352 if (!card->para[0] || !card->para[1]) {
353 printk(KERN_ERR "AsusPnP:some resources are missing %ld/%lx\n", 353 printk(KERN_ERR "AsusPnP:some resources are missing %ld/%lx\n",
354 card->para[0], card->para[1]); 354 card->para[0], card->para[1]);
355 pnp_disable_dev(pnp_d); 355 pnp_disable_dev(pnp_d);
356 return(0); 356 return (0);
357 } 357 }
358 break; 358 break;
359 } else { 359 } else {
@@ -362,10 +362,10 @@ setup_asuscom(struct IsdnCard *card)
362 } 362 }
363 ipid++; 363 ipid++;
364 pnp_c = NULL; 364 pnp_c = NULL;
365 } 365 }
366 if (!ipid->card_vendor) { 366 if (!ipid->card_vendor) {
367 printk(KERN_INFO "AsusPnP: no ISAPnP card found\n"); 367 printk(KERN_INFO "AsusPnP: no ISAPnP card found\n");
368 return(0); 368 return (0);
369 } 369 }
370 } 370 }
371#endif 371#endif
@@ -380,14 +380,14 @@ setup_asuscom(struct IsdnCard *card)
380 return (0); 380 return (0);
381 } 381 }
382 printk(KERN_INFO "ISDNLink: defined at 0x%x IRQ %d\n", 382 printk(KERN_INFO "ISDNLink: defined at 0x%x IRQ %d\n",
383 cs->hw.asus.cfg_reg, cs->irq); 383 cs->hw.asus.cfg_reg, cs->irq);
384 setup_isac(cs); 384 setup_isac(cs);
385 cs->BC_Read_Reg = &ReadHSCX; 385 cs->BC_Read_Reg = &ReadHSCX;
386 cs->BC_Write_Reg = &WriteHSCX; 386 cs->BC_Write_Reg = &WriteHSCX;
387 cs->BC_Send_Data = &hscx_fill_fifo; 387 cs->BC_Send_Data = &hscx_fill_fifo;
388 cs->cardmsg = &Asus_card_msg; 388 cs->cardmsg = &Asus_card_msg;
389 val = readreg(cs->hw.asus.cfg_reg + ASUS_IPAC_ALE, 389 val = readreg(cs->hw.asus.cfg_reg + ASUS_IPAC_ALE,
390 cs->hw.asus.cfg_reg + ASUS_IPAC_DATA, IPAC_ID); 390 cs->hw.asus.cfg_reg + ASUS_IPAC_DATA, IPAC_ID);
391 if ((val == 1) || (val == 2)) { 391 if ((val == 1) || (val == 2)) {
392 cs->subtyp = ASUS_IPAC; 392 cs->subtyp = ASUS_IPAC;
393 cs->hw.asus.adr = cs->hw.asus.cfg_reg + ASUS_IPAC_ALE; 393 cs->hw.asus.adr = cs->hw.asus.cfg_reg + ASUS_IPAC_ALE;
@@ -415,7 +415,7 @@ setup_asuscom(struct IsdnCard *card)
415 ISACVersion(cs, "ISDNLink:"); 415 ISACVersion(cs, "ISDNLink:");
416 if (HscxVersion(cs, "ISDNLink:")) { 416 if (HscxVersion(cs, "ISDNLink:")) {
417 printk(KERN_WARNING 417 printk(KERN_WARNING
418 "ISDNLink: wrong HSCX versions check IO address\n"); 418 "ISDNLink: wrong HSCX versions check IO address\n");
419 release_io_asuscom(cs); 419 release_io_asuscom(cs);
420 return (0); 420 return (0);
421 } 421 }