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/ix1_micro.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/ix1_micro.c')
-rw-r--r-- | drivers/isdn/hisax/ix1_micro.c | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c index a92bf0d2cab2..5f299f82b801 100644 --- a/drivers/isdn/hisax/ix1_micro.c +++ b/drivers/isdn/hisax/ix1_micro.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright by Klaus-Peter Nischke, ITK AG | 7 | * Copyright by Klaus-Peter Nischke, ITK AG |
8 | * <klaus@nischke.do.eunet.de> | 8 | * <klaus@nischke.do.eunet.de> |
9 | * by Karsten Keil <keil@isdn4linux.de> | 9 | * by Karsten Keil <keil@isdn4linux.de> |
10 | * | 10 | * |
11 | * This software may be used and distributed according to the terms | 11 | * This software may be used and distributed according to the terms |
12 | * of the GNU General Public License, incorporated herein by reference. | 12 | * of the GNU General Public License, incorporated herein by reference. |
13 | * | 13 | * |
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | static const char *ix1_revision = "$Revision: 2.12.2.4 $"; | 27 | static const char *ix1_revision = "$Revision: 2.12.2.4 $"; |
28 | 28 | ||
29 | #define byteout(addr,val) outb(val,addr) | 29 | #define byteout(addr, val) outb(val, addr) |
30 | #define bytein(addr) inb(addr) | 30 | #define bytein(addr) inb(addr) |
31 | 31 | ||
32 | #define SPECIAL_PORT_OFFSET 3 | 32 | #define SPECIAL_PORT_OFFSET 3 |
@@ -49,7 +49,7 @@ readreg(unsigned int ale, unsigned int adr, u_char off) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | static inline void | 51 | static inline void |
52 | readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) | 52 | readfifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size) |
53 | { | 53 | { |
54 | byteout(ale, off); | 54 | byteout(ale, off); |
55 | insb(adr, data, size); | 55 | insb(adr, data, size); |
@@ -64,7 +64,7 @@ writereg(unsigned int ale, unsigned int adr, u_char off, u_char data) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | static inline void | 66 | static inline void |
67 | writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) | 67 | writefifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size) |
68 | { | 68 | { |
69 | byteout(ale, off); | 69 | byteout(ale, off); |
70 | outsb(adr, data, size); | 70 | outsb(adr, data, size); |
@@ -85,13 +85,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
88 | ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 88 | ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
89 | { | 89 | { |
90 | readfifo(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, 0, data, size); | 90 | readfifo(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, 0, data, size); |
91 | } | 91 | } |
92 | 92 | ||
93 | static void | 93 | static void |
94 | WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 94 | WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
95 | { | 95 | { |
96 | writefifo(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, 0, data, size); | 96 | writefifo(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, 0, data, size); |
97 | } | 97 | } |
@@ -110,16 +110,16 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) | |||
110 | cs->hw.ix1.hscx, offset + (hscx ? 0x40 : 0), value); | 110 | cs->hw.ix1.hscx, offset + (hscx ? 0x40 : 0), value); |
111 | } | 111 | } |
112 | 112 | ||
113 | #define READHSCX(cs, nr, reg) readreg(cs->hw.ix1.hscx_ale, \ | 113 | #define READHSCX(cs, nr, reg) readreg(cs->hw.ix1.hscx_ale, \ |
114 | cs->hw.ix1.hscx, reg + (nr ? 0x40 : 0)) | 114 | cs->hw.ix1.hscx, reg + (nr ? 0x40 : 0)) |
115 | #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.ix1.hscx_ale, \ | 115 | #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.ix1.hscx_ale, \ |
116 | cs->hw.ix1.hscx, reg + (nr ? 0x40 : 0), data) | 116 | cs->hw.ix1.hscx, reg + (nr ? 0x40 : 0), data) |
117 | 117 | ||
118 | #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.ix1.hscx_ale, \ | 118 | #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.ix1.hscx_ale, \ |
119 | cs->hw.ix1.hscx, (nr ? 0x40 : 0), ptr, cnt) | 119 | cs->hw.ix1.hscx, (nr ? 0x40 : 0), ptr, cnt) |
120 | 120 | ||
121 | #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.ix1.hscx_ale, \ | 121 | #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.ix1.hscx_ale, \ |
122 | cs->hw.ix1.hscx, (nr ? 0x40 : 0), ptr, cnt) | 122 | cs->hw.ix1.hscx, (nr ? 0x40 : 0), ptr, cnt) |
123 | 123 | ||
124 | #include "hscx_irq.c" | 124 | #include "hscx_irq.c" |
125 | 125 | ||
@@ -132,11 +132,11 @@ ix1micro_interrupt(int intno, void *dev_id) | |||
132 | 132 | ||
133 | spin_lock_irqsave(&cs->lock, flags); | 133 | spin_lock_irqsave(&cs->lock, flags); |
134 | val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40); | 134 | val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40); |
135 | Start_HSCX: | 135 | Start_HSCX: |
136 | if (val) | 136 | if (val) |
137 | hscx_int_main(cs, val); | 137 | hscx_int_main(cs, val); |
138 | val = readreg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_ISTA); | 138 | val = readreg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_ISTA); |
139 | Start_ISAC: | 139 | Start_ISAC: |
140 | if (val) | 140 | if (val) |
141 | isac_interrupt(cs, val); | 141 | isac_interrupt(cs, val); |
142 | val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40); | 142 | val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40); |
@@ -188,33 +188,33 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
188 | u_long flags; | 188 | u_long flags; |
189 | 189 | ||
190 | switch (mt) { | 190 | switch (mt) { |
191 | case CARD_RESET: | 191 | case CARD_RESET: |
192 | spin_lock_irqsave(&cs->lock, flags); | 192 | spin_lock_irqsave(&cs->lock, flags); |
193 | ix1_reset(cs); | 193 | ix1_reset(cs); |
194 | spin_unlock_irqrestore(&cs->lock, flags); | 194 | spin_unlock_irqrestore(&cs->lock, flags); |
195 | return(0); | 195 | return (0); |
196 | case CARD_RELEASE: | 196 | case CARD_RELEASE: |
197 | release_io_ix1micro(cs); | 197 | release_io_ix1micro(cs); |
198 | return(0); | 198 | return (0); |
199 | case CARD_INIT: | 199 | case CARD_INIT: |
200 | spin_lock_irqsave(&cs->lock, flags); | 200 | spin_lock_irqsave(&cs->lock, flags); |
201 | ix1_reset(cs); | 201 | ix1_reset(cs); |
202 | inithscxisac(cs, 3); | 202 | inithscxisac(cs, 3); |
203 | spin_unlock_irqrestore(&cs->lock, flags); | 203 | spin_unlock_irqrestore(&cs->lock, flags); |
204 | return(0); | 204 | return (0); |
205 | case CARD_TEST: | 205 | case CARD_TEST: |
206 | return(0); | 206 | return (0); |
207 | } | 207 | } |
208 | return(0); | 208 | return (0); |
209 | } | 209 | } |
210 | 210 | ||
211 | #ifdef __ISAPNP__ | 211 | #ifdef __ISAPNP__ |
212 | static struct isapnp_device_id itk_ids[] __devinitdata = { | 212 | static struct isapnp_device_id itk_ids[] __devinitdata = { |
213 | { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), | 213 | { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), |
214 | ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), | 214 | ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), |
215 | (unsigned long) "ITK micro 2" }, | 215 | (unsigned long) "ITK micro 2" }, |
216 | { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x29), | 216 | { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x29), |
217 | ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x29), | 217 | ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x29), |
218 | (unsigned long) "ITK micro 2." }, | 218 | (unsigned long) "ITK micro 2." }, |
219 | { 0, } | 219 | { 0, } |
220 | }; | 220 | }; |
@@ -238,30 +238,30 @@ setup_ix1micro(struct IsdnCard *card) | |||
238 | #ifdef __ISAPNP__ | 238 | #ifdef __ISAPNP__ |
239 | if (!card->para[1] && isapnp_present()) { | 239 | if (!card->para[1] && isapnp_present()) { |
240 | struct pnp_dev *pnp_d; | 240 | struct pnp_dev *pnp_d; |
241 | while(ipid->card_vendor) { | 241 | while (ipid->card_vendor) { |
242 | if ((pnp_c = pnp_find_card(ipid->card_vendor, | 242 | if ((pnp_c = pnp_find_card(ipid->card_vendor, |
243 | ipid->card_device, pnp_c))) { | 243 | ipid->card_device, pnp_c))) { |
244 | pnp_d = NULL; | 244 | pnp_d = NULL; |
245 | if ((pnp_d = pnp_find_dev(pnp_c, | 245 | if ((pnp_d = pnp_find_dev(pnp_c, |
246 | ipid->vendor, ipid->function, pnp_d))) { | 246 | ipid->vendor, ipid->function, pnp_d))) { |
247 | int err; | 247 | int err; |
248 | 248 | ||
249 | printk(KERN_INFO "HiSax: %s detected\n", | 249 | printk(KERN_INFO "HiSax: %s detected\n", |
250 | (char *)ipid->driver_data); | 250 | (char *)ipid->driver_data); |
251 | pnp_disable_dev(pnp_d); | 251 | pnp_disable_dev(pnp_d); |
252 | err = pnp_activate_dev(pnp_d); | 252 | err = pnp_activate_dev(pnp_d); |
253 | if (err<0) { | 253 | if (err < 0) { |
254 | printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", | 254 | printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", |
255 | __func__, err); | 255 | __func__, err); |
256 | return(0); | 256 | return (0); |
257 | } | 257 | } |
258 | card->para[1] = pnp_port_start(pnp_d, 0); | 258 | card->para[1] = pnp_port_start(pnp_d, 0); |
259 | card->para[0] = pnp_irq(pnp_d, 0); | 259 | card->para[0] = pnp_irq(pnp_d, 0); |
260 | if (!card->para[0] || !card->para[1]) { | 260 | if (!card->para[0] || !card->para[1]) { |
261 | printk(KERN_ERR "ITK PnP:some resources are missing %ld/%lx\n", | 261 | printk(KERN_ERR "ITK PnP:some resources are missing %ld/%lx\n", |
262 | card->para[0], card->para[1]); | 262 | card->para[0], card->para[1]); |
263 | pnp_disable_dev(pnp_d); | 263 | pnp_disable_dev(pnp_d); |
264 | return(0); | 264 | return (0); |
265 | } | 265 | } |
266 | break; | 266 | break; |
267 | } else { | 267 | } else { |
@@ -270,10 +270,10 @@ setup_ix1micro(struct IsdnCard *card) | |||
270 | } | 270 | } |
271 | ipid++; | 271 | ipid++; |
272 | pnp_c = NULL; | 272 | pnp_c = NULL; |
273 | } | 273 | } |
274 | if (!ipid->card_vendor) { | 274 | if (!ipid->card_vendor) { |
275 | printk(KERN_INFO "ITK PnP: no ISAPnP card found\n"); | 275 | printk(KERN_INFO "ITK PnP: no ISAPnP card found\n"); |
276 | return(0); | 276 | return (0); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | #endif | 279 | #endif |
@@ -287,15 +287,15 @@ setup_ix1micro(struct IsdnCard *card) | |||
287 | if (cs->hw.ix1.cfg_reg) { | 287 | if (cs->hw.ix1.cfg_reg) { |
288 | if (!request_region(cs->hw.ix1.cfg_reg, 4, "ix1micro cfg")) { | 288 | if (!request_region(cs->hw.ix1.cfg_reg, 4, "ix1micro cfg")) { |
289 | printk(KERN_WARNING | 289 | printk(KERN_WARNING |
290 | "HiSax: ITK ix1-micro Rev.2 config port " | 290 | "HiSax: ITK ix1-micro Rev.2 config port " |
291 | "%x-%x already in use\n", | 291 | "%x-%x already in use\n", |
292 | cs->hw.ix1.cfg_reg, | 292 | cs->hw.ix1.cfg_reg, |
293 | cs->hw.ix1.cfg_reg + 4); | 293 | cs->hw.ix1.cfg_reg + 4); |
294 | return (0); | 294 | return (0); |
295 | } | 295 | } |
296 | } | 296 | } |
297 | printk(KERN_INFO "HiSax: ITK ix1-micro Rev.2 config irq:%d io:0x%X\n", | 297 | printk(KERN_INFO "HiSax: ITK ix1-micro Rev.2 config irq:%d io:0x%X\n", |
298 | cs->irq, cs->hw.ix1.cfg_reg); | 298 | cs->irq, cs->hw.ix1.cfg_reg); |
299 | setup_isac(cs); | 299 | setup_isac(cs); |
300 | cs->readisac = &ReadISAC; | 300 | cs->readisac = &ReadISAC; |
301 | cs->writeisac = &WriteISAC; | 301 | cs->writeisac = &WriteISAC; |
@@ -309,7 +309,7 @@ setup_ix1micro(struct IsdnCard *card) | |||
309 | ISACVersion(cs, "ix1-Micro:"); | 309 | ISACVersion(cs, "ix1-Micro:"); |
310 | if (HscxVersion(cs, "ix1-Micro:")) { | 310 | if (HscxVersion(cs, "ix1-Micro:")) { |
311 | printk(KERN_WARNING | 311 | printk(KERN_WARNING |
312 | "ix1-Micro: wrong HSCX versions check IO address\n"); | 312 | "ix1-Micro: wrong HSCX versions check IO address\n"); |
313 | release_io_ix1micro(cs); | 313 | release_io_ix1micro(cs); |
314 | return (0); | 314 | return (0); |
315 | } | 315 | } |