diff options
author | Joe Perches <joe@perches.com> | 2012-02-19 22:52:38 -0500 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2012-02-21 12:04:01 -0500 |
commit | 475be4d85a274d0961593db41cf85689db1d583c (patch) | |
tree | b2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hisax/niccy.c | |
parent | 0b0a635f79f91f3755b6518627ea06dd0dbfd523 (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/niccy.c')
-rw-r--r-- | drivers/isdn/hisax/niccy.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index ccaa6e13310f..6569e0315cca 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c | |||
@@ -5,10 +5,10 @@ | |||
5 | * | 5 | * |
6 | * Author Karsten Keil | 6 | * Author Karsten Keil |
7 | * Copyright by Karsten Keil <keil@isdn4linux.de> | 7 | * Copyright by Karsten Keil <keil@isdn4linux.de> |
8 | * | 8 | * |
9 | * This software may be used and distributed according to the terms | 9 | * This software may be used and distributed according to the terms |
10 | * of the GNU General Public License, incorporated herein by reference. | 10 | * of the GNU General Public License, incorporated herein by reference. |
11 | * | 11 | * |
12 | * Thanks to Dr. Neuhaus and SAGEM for information | 12 | * Thanks to Dr. Neuhaus and SAGEM for information |
13 | * | 13 | * |
14 | */ | 14 | */ |
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | static const char *niccy_revision = "$Revision: 1.21.2.4 $"; | 24 | static const char *niccy_revision = "$Revision: 1.21.2.4 $"; |
25 | 25 | ||
26 | #define byteout(addr,val) outb(val,addr) | 26 | #define byteout(addr, val) outb(val, addr) |
27 | #define bytein(addr) inb(addr) | 27 | #define bytein(addr) inb(addr) |
28 | 28 | ||
29 | #define ISAC_PCI_DATA 0 | 29 | #define ISAC_PCI_DATA 0 |
@@ -53,21 +53,21 @@ static inline u_char readreg(unsigned int ale, unsigned int adr, u_char off) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | static inline void readfifo(unsigned int ale, unsigned int adr, u_char off, | 55 | static inline void readfifo(unsigned int ale, unsigned int adr, u_char off, |
56 | u_char *data, int size) | 56 | u_char *data, int size) |
57 | { | 57 | { |
58 | byteout(ale, off); | 58 | byteout(ale, off); |
59 | insb(adr, data, size); | 59 | insb(adr, data, size); |
60 | } | 60 | } |
61 | 61 | ||
62 | static inline void writereg(unsigned int ale, unsigned int adr, u_char off, | 62 | static inline void writereg(unsigned int ale, unsigned int adr, u_char off, |
63 | u_char data) | 63 | u_char data) |
64 | { | 64 | { |
65 | byteout(ale, off); | 65 | byteout(ale, off); |
66 | byteout(adr, data); | 66 | byteout(adr, data); |
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void writefifo(unsigned int ale, unsigned int adr, u_char off, | 69 | static inline void writefifo(unsigned int ale, unsigned int adr, u_char off, |
70 | u_char *data, int size) | 70 | u_char *data, int size) |
71 | { | 71 | { |
72 | byteout(ale, off); | 72 | byteout(ale, off); |
73 | outsb(adr, data, size); | 73 | outsb(adr, data, size); |
@@ -85,12 +85,12 @@ static void WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) | |||
85 | writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset, value); | 85 | writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset, value); |
86 | } | 86 | } |
87 | 87 | ||
88 | static void ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 88 | static void ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
89 | { | 89 | { |
90 | readfifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); | 90 | readfifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); |
91 | } | 91 | } |
92 | 92 | ||
93 | static void WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 93 | static void WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
94 | { | 94 | { |
95 | writefifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); | 95 | writefifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); |
96 | } | 96 | } |
@@ -98,26 +98,26 @@ static void WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) | |||
98 | static u_char ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) | 98 | static u_char ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) |
99 | { | 99 | { |
100 | return readreg(cs->hw.niccy.hscx_ale, | 100 | return readreg(cs->hw.niccy.hscx_ale, |
101 | cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0)); | 101 | cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0)); |
102 | } | 102 | } |
103 | 103 | ||
104 | static void WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, | 104 | static void WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, |
105 | u_char value) | 105 | u_char value) |
106 | { | 106 | { |
107 | writereg(cs->hw.niccy.hscx_ale, | 107 | writereg(cs->hw.niccy.hscx_ale, |
108 | cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0), value); | 108 | cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0), value); |
109 | } | 109 | } |
110 | 110 | ||
111 | #define READHSCX(cs, nr, reg) readreg(cs->hw.niccy.hscx_ale, \ | 111 | #define READHSCX(cs, nr, reg) readreg(cs->hw.niccy.hscx_ale, \ |
112 | cs->hw.niccy.hscx, reg + (nr ? 0x40 : 0)) | 112 | cs->hw.niccy.hscx, reg + (nr ? 0x40 : 0)) |
113 | #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.niccy.hscx_ale, \ | 113 | #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.niccy.hscx_ale, \ |
114 | cs->hw.niccy.hscx, reg + (nr ? 0x40 : 0), data) | 114 | cs->hw.niccy.hscx, reg + (nr ? 0x40 : 0), data) |
115 | 115 | ||
116 | #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.niccy.hscx_ale, \ | 116 | #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.niccy.hscx_ale, \ |
117 | cs->hw.niccy.hscx, (nr ? 0x40 : 0), ptr, cnt) | 117 | cs->hw.niccy.hscx, (nr ? 0x40 : 0), ptr, cnt) |
118 | 118 | ||
119 | #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.niccy.hscx_ale, \ | 119 | #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.niccy.hscx_ale, \ |
120 | cs->hw.niccy.hscx, (nr ? 0x40 : 0), ptr, cnt) | 120 | cs->hw.niccy.hscx, (nr ? 0x40 : 0), ptr, cnt) |
121 | 121 | ||
122 | #include "hscx_irq.c" | 122 | #include "hscx_irq.c" |
123 | 123 | ||
@@ -138,7 +138,7 @@ static irqreturn_t niccy_interrupt(int intno, void *dev_id) | |||
138 | outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); | 138 | outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); |
139 | } | 139 | } |
140 | val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, | 140 | val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, |
141 | HSCX_ISTA + 0x40); | 141 | HSCX_ISTA + 0x40); |
142 | Start_HSCX: | 142 | Start_HSCX: |
143 | if (val) | 143 | if (val) |
144 | hscx_int_main(cs, val); | 144 | hscx_int_main(cs, val); |
@@ -147,7 +147,7 @@ Start_ISAC: | |||
147 | if (val) | 147 | if (val) |
148 | isac_interrupt(cs, val); | 148 | isac_interrupt(cs, val); |
149 | val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, | 149 | val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, |
150 | HSCX_ISTA + 0x40); | 150 | HSCX_ISTA + 0x40); |
151 | if (val) { | 151 | if (val) { |
152 | if (cs->debug & L1_DEB_HSCX) | 152 | if (cs->debug & L1_DEB_HSCX) |
153 | debugl1(cs, "HSCX IntStat after IntRoutine"); | 153 | debugl1(cs, "HSCX IntStat after IntRoutine"); |
@@ -165,7 +165,7 @@ Start_ISAC: | |||
165 | writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0xFF); | 165 | writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0xFF); |
166 | writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0); | 166 | writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0); |
167 | writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0); | 167 | writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0); |
168 | writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40,0); | 168 | writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0); |
169 | spin_unlock_irqrestore(&cs->lock, flags); | 169 | spin_unlock_irqrestore(&cs->lock, flags); |
170 | return IRQ_HANDLED; | 170 | return IRQ_HANDLED; |
171 | } | 171 | } |
@@ -241,32 +241,32 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
241 | int err; | 241 | int err; |
242 | 242 | ||
243 | pnp_c = pnp_find_card(ISAPNP_VENDOR('S', 'D', 'A'), | 243 | pnp_c = pnp_find_card(ISAPNP_VENDOR('S', 'D', 'A'), |
244 | ISAPNP_FUNCTION(0x0150), pnp_c); | 244 | ISAPNP_FUNCTION(0x0150), pnp_c); |
245 | if (pnp_c) { | 245 | if (pnp_c) { |
246 | pnp_d = pnp_find_dev(pnp_c, | 246 | pnp_d = pnp_find_dev(pnp_c, |
247 | ISAPNP_VENDOR('S', 'D', 'A'), | 247 | ISAPNP_VENDOR('S', 'D', 'A'), |
248 | ISAPNP_FUNCTION(0x0150), pnp_d); | 248 | ISAPNP_FUNCTION(0x0150), pnp_d); |
249 | if (!pnp_d) { | 249 | if (!pnp_d) { |
250 | printk(KERN_ERR "NiccyPnP: PnP error card " | 250 | printk(KERN_ERR "NiccyPnP: PnP error card " |
251 | "found, no device\n"); | 251 | "found, no device\n"); |
252 | return 0; | 252 | return 0; |
253 | } | 253 | } |
254 | pnp_disable_dev(pnp_d); | 254 | pnp_disable_dev(pnp_d); |
255 | err = pnp_activate_dev(pnp_d); | 255 | err = pnp_activate_dev(pnp_d); |
256 | if (err < 0) { | 256 | if (err < 0) { |
257 | printk(KERN_WARNING "%s: pnp_activate_dev " | 257 | printk(KERN_WARNING "%s: pnp_activate_dev " |
258 | "ret(%d)\n", __func__, err); | 258 | "ret(%d)\n", __func__, err); |
259 | return 0; | 259 | return 0; |
260 | } | 260 | } |
261 | card->para[1] = pnp_port_start(pnp_d, 0); | 261 | card->para[1] = pnp_port_start(pnp_d, 0); |
262 | card->para[2] = pnp_port_start(pnp_d, 1); | 262 | card->para[2] = pnp_port_start(pnp_d, 1); |
263 | card->para[0] = pnp_irq(pnp_d, 0); | 263 | card->para[0] = pnp_irq(pnp_d, 0); |
264 | if (!card->para[0] || !card->para[1] || | 264 | if (!card->para[0] || !card->para[1] || |
265 | !card->para[2]) { | 265 | !card->para[2]) { |
266 | printk(KERN_ERR "NiccyPnP:some resources are " | 266 | printk(KERN_ERR "NiccyPnP:some resources are " |
267 | "missing %ld/%lx/%lx\n", | 267 | "missing %ld/%lx/%lx\n", |
268 | card->para[0], card->para[1], | 268 | card->para[0], card->para[1], |
269 | card->para[2]); | 269 | card->para[2]); |
270 | pnp_disable_dev(pnp_d); | 270 | pnp_disable_dev(pnp_d); |
271 | return 0; | 271 | return 0; |
272 | } | 272 | } |
@@ -284,15 +284,15 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
284 | cs->irq = card->para[0]; | 284 | cs->irq = card->para[0]; |
285 | if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) { | 285 | if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) { |
286 | printk(KERN_WARNING "HiSax: NICCY data port %x-%x " | 286 | printk(KERN_WARNING "HiSax: NICCY data port %x-%x " |
287 | "already in use\n", | 287 | "already in use\n", |
288 | cs->hw.niccy.isac, cs->hw.niccy.isac + 1); | 288 | cs->hw.niccy.isac, cs->hw.niccy.isac + 1); |
289 | return 0; | 289 | return 0; |
290 | } | 290 | } |
291 | if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) { | 291 | if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) { |
292 | printk(KERN_WARNING "HiSax: NICCY address port %x-%x " | 292 | printk(KERN_WARNING "HiSax: NICCY address port %x-%x " |
293 | "already in use\n", | 293 | "already in use\n", |
294 | cs->hw.niccy.isac_ale, | 294 | cs->hw.niccy.isac_ale, |
295 | cs->hw.niccy.isac_ale + 1); | 295 | cs->hw.niccy.isac_ale + 1); |
296 | release_region(cs->hw.niccy.isac, 2); | 296 | release_region(cs->hw.niccy.isac, 2); |
297 | return 0; | 297 | return 0; |
298 | } | 298 | } |
@@ -303,8 +303,8 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
303 | u_int pci_ioaddr; | 303 | u_int pci_ioaddr; |
304 | cs->subtyp = 0; | 304 | cs->subtyp = 0; |
305 | if ((niccy_dev = hisax_find_pci_device(PCI_VENDOR_ID_SATSAGEM, | 305 | if ((niccy_dev = hisax_find_pci_device(PCI_VENDOR_ID_SATSAGEM, |
306 | PCI_DEVICE_ID_SATSAGEM_NICCY, | 306 | PCI_DEVICE_ID_SATSAGEM_NICCY, |
307 | niccy_dev))) { | 307 | niccy_dev))) { |
308 | if (pci_enable_device(niccy_dev)) | 308 | if (pci_enable_device(niccy_dev)) |
309 | return 0; | 309 | return 0; |
310 | /* get IRQ */ | 310 | /* get IRQ */ |
@@ -357,8 +357,8 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
357 | #endif /* CONFIG_PCI */ | 357 | #endif /* CONFIG_PCI */ |
358 | } | 358 | } |
359 | printk(KERN_INFO "HiSax: NICCY %s config irq:%d data:0x%X ale:0x%X\n", | 359 | printk(KERN_INFO "HiSax: NICCY %s config irq:%d data:0x%X ale:0x%X\n", |
360 | (cs->subtyp == 1) ? "PnP" : "PCI", | 360 | (cs->subtyp == 1) ? "PnP" : "PCI", |
361 | cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); | 361 | cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); |
362 | setup_isac(cs); | 362 | setup_isac(cs); |
363 | cs->readisac = &ReadISAC; | 363 | cs->readisac = &ReadISAC; |
364 | cs->writeisac = &WriteISAC; | 364 | cs->writeisac = &WriteISAC; |
@@ -372,7 +372,7 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
372 | ISACVersion(cs, "Niccy:"); | 372 | ISACVersion(cs, "Niccy:"); |
373 | if (HscxVersion(cs, "Niccy:")) { | 373 | if (HscxVersion(cs, "Niccy:")) { |
374 | printk(KERN_WARNING "Niccy: wrong HSCX versions check IO " | 374 | printk(KERN_WARNING "Niccy: wrong HSCX versions check IO " |
375 | "address\n"); | 375 | "address\n"); |
376 | release_io_niccy(cs); | 376 | release_io_niccy(cs); |
377 | return 0; | 377 | return 0; |
378 | } | 378 | } |