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/saphir.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/saphir.c')
-rw-r--r-- | drivers/isdn/hisax/saphir.c | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c index b34a81d655b8..75dcae6d36e0 100644 --- a/drivers/isdn/hisax/saphir.c +++ b/drivers/isdn/hisax/saphir.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Author Karsten Keil | 5 | * Author Karsten Keil |
6 | * Copyright by Karsten Keil <keil@isdn4linux.de> | 6 | * Copyright by Karsten Keil <keil@isdn4linux.de> |
7 | * | 7 | * |
8 | * This software may be used and distributed according to the terms | 8 | * This software may be used and distributed according to the terms |
9 | * of the GNU General Public License, incorporated herein by reference. | 9 | * of the GNU General Public License, incorporated herein by reference. |
10 | * | 10 | * |
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | static char *saphir_rev = "$Revision: 1.10.2.4 $"; | 21 | static char *saphir_rev = "$Revision: 1.10.2.4 $"; |
22 | 22 | ||
23 | #define byteout(addr,val) outb(val,addr) | 23 | #define byteout(addr, val) outb(val, addr) |
24 | #define bytein(addr) inb(addr) | 24 | #define bytein(addr) inb(addr) |
25 | 25 | ||
26 | #define ISAC_DATA 0 | 26 | #define ISAC_DATA 0 |
@@ -41,7 +41,7 @@ readreg(unsigned int ale, unsigned int adr, u_char off) | |||
41 | } | 41 | } |
42 | 42 | ||
43 | static inline void | 43 | static inline void |
44 | readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) | 44 | readfifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size) |
45 | { | 45 | { |
46 | byteout(ale, off); | 46 | byteout(ale, off); |
47 | insb(adr, data, size); | 47 | insb(adr, data, size); |
@@ -56,7 +56,7 @@ writereg(unsigned int ale, unsigned int adr, u_char off, u_char data) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | static inline void | 58 | static inline void |
59 | writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) | 59 | writefifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size) |
60 | { | 60 | { |
61 | byteout(ale, off); | 61 | byteout(ale, off); |
62 | outsb(adr, data, size); | 62 | outsb(adr, data, size); |
@@ -77,13 +77,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
80 | ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 80 | ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
81 | { | 81 | { |
82 | readfifo(cs->hw.saphir.ale, cs->hw.saphir.isac, 0, data, size); | 82 | readfifo(cs->hw.saphir.ale, cs->hw.saphir.isac, 0, data, size); |
83 | } | 83 | } |
84 | 84 | ||
85 | static void | 85 | static void |
86 | WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 86 | WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
87 | { | 87 | { |
88 | writefifo(cs->hw.saphir.ale, cs->hw.saphir.isac, 0, data, size); | 88 | writefifo(cs->hw.saphir.ale, cs->hw.saphir.isac, 0, data, size); |
89 | } | 89 | } |
@@ -92,26 +92,26 @@ static u_char | |||
92 | ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) | 92 | ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) |
93 | { | 93 | { |
94 | return (readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, | 94 | return (readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, |
95 | offset + (hscx ? 0x40 : 0))); | 95 | offset + (hscx ? 0x40 : 0))); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void | 98 | static void |
99 | WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) | 99 | WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) |
100 | { | 100 | { |
101 | writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, | 101 | writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, |
102 | offset + (hscx ? 0x40 : 0), value); | 102 | offset + (hscx ? 0x40 : 0), value); |
103 | } | 103 | } |
104 | 104 | ||
105 | #define READHSCX(cs, nr, reg) readreg(cs->hw.saphir.ale, \ | 105 | #define READHSCX(cs, nr, reg) readreg(cs->hw.saphir.ale, \ |
106 | cs->hw.saphir.hscx, reg + (nr ? 0x40 : 0)) | 106 | cs->hw.saphir.hscx, reg + (nr ? 0x40 : 0)) |
107 | #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.saphir.ale, \ | 107 | #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.saphir.ale, \ |
108 | cs->hw.saphir.hscx, reg + (nr ? 0x40 : 0), data) | 108 | cs->hw.saphir.hscx, reg + (nr ? 0x40 : 0), data) |
109 | 109 | ||
110 | #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.saphir.ale, \ | 110 | #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.saphir.ale, \ |
111 | cs->hw.saphir.hscx, (nr ? 0x40 : 0), ptr, cnt) | 111 | cs->hw.saphir.hscx, (nr ? 0x40 : 0), ptr, cnt) |
112 | 112 | ||
113 | #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.saphir.ale, \ | 113 | #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.saphir.ale, \ |
114 | cs->hw.saphir.hscx, (nr ? 0x40 : 0), ptr, cnt) | 114 | cs->hw.saphir.hscx, (nr ? 0x40 : 0), ptr, cnt) |
115 | 115 | ||
116 | #include "hscx_irq.c" | 116 | #include "hscx_irq.c" |
117 | 117 | ||
@@ -124,11 +124,11 @@ saphir_interrupt(int intno, void *dev_id) | |||
124 | 124 | ||
125 | spin_lock_irqsave(&cs->lock, flags); | 125 | spin_lock_irqsave(&cs->lock, flags); |
126 | val = readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_ISTA + 0x40); | 126 | val = readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_ISTA + 0x40); |
127 | Start_HSCX: | 127 | Start_HSCX: |
128 | if (val) | 128 | if (val) |
129 | hscx_int_main(cs, val); | 129 | hscx_int_main(cs, val); |
130 | val = readreg(cs->hw.saphir.ale, cs->hw.saphir.isac, ISAC_ISTA); | 130 | val = readreg(cs->hw.saphir.ale, cs->hw.saphir.isac, ISAC_ISTA); |
131 | Start_ISAC: | 131 | Start_ISAC: |
132 | if (val) | 132 | if (val) |
133 | isac_interrupt(cs, val); | 133 | isac_interrupt(cs, val); |
134 | val = readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_ISTA + 0x40); | 134 | val = readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_ISTA + 0x40); |
@@ -144,8 +144,8 @@ saphir_interrupt(int intno, void *dev_id) | |||
144 | goto Start_ISAC; | 144 | goto Start_ISAC; |
145 | } | 145 | } |
146 | /* Watchdog */ | 146 | /* Watchdog */ |
147 | if (cs->hw.saphir.timer.function) | 147 | if (cs->hw.saphir.timer.function) |
148 | mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ); | 148 | mod_timer(&cs->hw.saphir.timer, jiffies + 1 * HZ); |
149 | else | 149 | else |
150 | printk(KERN_WARNING "saphir: Spurious timer!\n"); | 150 | printk(KERN_WARNING "saphir: Spurious timer!\n"); |
151 | writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK, 0xFF); | 151 | writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK, 0xFF); |
@@ -164,10 +164,10 @@ SaphirWatchDog(struct IsdnCardState *cs) | |||
164 | u_long flags; | 164 | u_long flags; |
165 | 165 | ||
166 | spin_lock_irqsave(&cs->lock, flags); | 166 | spin_lock_irqsave(&cs->lock, flags); |
167 | /* 5 sec WatchDog, so read at least every 4 sec */ | 167 | /* 5 sec WatchDog, so read at least every 4 sec */ |
168 | cs->readisac(cs, ISAC_RBCH); | 168 | cs->readisac(cs, ISAC_RBCH); |
169 | spin_unlock_irqrestore(&cs->lock, flags); | 169 | spin_unlock_irqrestore(&cs->lock, flags); |
170 | mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ); | 170 | mod_timer(&cs->hw.saphir.timer, jiffies + 1 * HZ); |
171 | } | 171 | } |
172 | 172 | ||
173 | static void | 173 | static void |
@@ -185,24 +185,24 @@ saphir_reset(struct IsdnCardState *cs) | |||
185 | { | 185 | { |
186 | u_char irq_val; | 186 | u_char irq_val; |
187 | 187 | ||
188 | switch(cs->irq) { | 188 | switch (cs->irq) { |
189 | case 5: irq_val = 0; | 189 | case 5: irq_val = 0; |
190 | break; | 190 | break; |
191 | case 3: irq_val = 1; | 191 | case 3: irq_val = 1; |
192 | break; | 192 | break; |
193 | case 11: | 193 | case 11: |
194 | irq_val = 2; | 194 | irq_val = 2; |
195 | break; | 195 | break; |
196 | case 12: | 196 | case 12: |
197 | irq_val = 3; | 197 | irq_val = 3; |
198 | break; | 198 | break; |
199 | case 15: | 199 | case 15: |
200 | irq_val = 4; | 200 | irq_val = 4; |
201 | break; | 201 | break; |
202 | default: | 202 | default: |
203 | printk(KERN_WARNING "HiSax: saphir wrong IRQ %d\n", | 203 | printk(KERN_WARNING "HiSax: saphir wrong IRQ %d\n", |
204 | cs->irq); | 204 | cs->irq); |
205 | return (1); | 205 | return (1); |
206 | } | 206 | } |
207 | byteout(cs->hw.saphir.cfg_reg + IRQ_REG, irq_val); | 207 | byteout(cs->hw.saphir.cfg_reg + IRQ_REG, irq_val); |
208 | byteout(cs->hw.saphir.cfg_reg + RESET_REG, 1); | 208 | byteout(cs->hw.saphir.cfg_reg + RESET_REG, 1); |
@@ -220,23 +220,23 @@ saphir_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
220 | u_long flags; | 220 | u_long flags; |
221 | 221 | ||
222 | switch (mt) { | 222 | switch (mt) { |
223 | case CARD_RESET: | 223 | case CARD_RESET: |
224 | spin_lock_irqsave(&cs->lock, flags); | 224 | spin_lock_irqsave(&cs->lock, flags); |
225 | saphir_reset(cs); | 225 | saphir_reset(cs); |
226 | spin_unlock_irqrestore(&cs->lock, flags); | 226 | spin_unlock_irqrestore(&cs->lock, flags); |
227 | return(0); | 227 | return (0); |
228 | case CARD_RELEASE: | 228 | case CARD_RELEASE: |
229 | release_io_saphir(cs); | 229 | release_io_saphir(cs); |
230 | return(0); | 230 | return (0); |
231 | case CARD_INIT: | 231 | case CARD_INIT: |
232 | spin_lock_irqsave(&cs->lock, flags); | 232 | spin_lock_irqsave(&cs->lock, flags); |
233 | inithscxisac(cs, 3); | 233 | inithscxisac(cs, 3); |
234 | spin_unlock_irqrestore(&cs->lock, flags); | 234 | spin_unlock_irqrestore(&cs->lock, flags); |
235 | return(0); | 235 | return (0); |
236 | case CARD_TEST: | 236 | case CARD_TEST: |
237 | return(0); | 237 | return (0); |
238 | } | 238 | } |
239 | return(0); | 239 | return (0); |
240 | } | 240 | } |
241 | 241 | ||
242 | 242 | ||
@@ -259,9 +259,9 @@ setup_saphir(struct IsdnCard *card) | |||
259 | cs->irq = card->para[0]; | 259 | cs->irq = card->para[0]; |
260 | if (!request_region(cs->hw.saphir.cfg_reg, 6, "saphir")) { | 260 | if (!request_region(cs->hw.saphir.cfg_reg, 6, "saphir")) { |
261 | printk(KERN_WARNING | 261 | printk(KERN_WARNING |
262 | "HiSax: HST Saphir config port %x-%x already in use\n", | 262 | "HiSax: HST Saphir config port %x-%x already in use\n", |
263 | cs->hw.saphir.cfg_reg, | 263 | cs->hw.saphir.cfg_reg, |
264 | cs->hw.saphir.cfg_reg + 5); | 264 | cs->hw.saphir.cfg_reg + 5); |
265 | return (0); | 265 | return (0); |
266 | } | 266 | } |
267 | 267 | ||
@@ -272,7 +272,7 @@ setup_saphir(struct IsdnCard *card) | |||
272 | cs->hw.saphir.timer.function = (void *) SaphirWatchDog; | 272 | cs->hw.saphir.timer.function = (void *) SaphirWatchDog; |
273 | cs->hw.saphir.timer.data = (long) cs; | 273 | cs->hw.saphir.timer.data = (long) cs; |
274 | init_timer(&cs->hw.saphir.timer); | 274 | init_timer(&cs->hw.saphir.timer); |
275 | cs->hw.saphir.timer.expires = jiffies + 4*HZ; | 275 | cs->hw.saphir.timer.expires = jiffies + 4 * HZ; |
276 | add_timer(&cs->hw.saphir.timer); | 276 | add_timer(&cs->hw.saphir.timer); |
277 | if (saphir_reset(cs)) { | 277 | if (saphir_reset(cs)) { |
278 | release_io_saphir(cs); | 278 | release_io_saphir(cs); |
@@ -290,7 +290,7 @@ setup_saphir(struct IsdnCard *card) | |||
290 | ISACVersion(cs, "saphir:"); | 290 | ISACVersion(cs, "saphir:"); |
291 | if (HscxVersion(cs, "saphir:")) { | 291 | if (HscxVersion(cs, "saphir:")) { |
292 | printk(KERN_WARNING | 292 | printk(KERN_WARNING |
293 | "saphir: wrong HSCX versions check IO address\n"); | 293 | "saphir: wrong HSCX versions check IO address\n"); |
294 | release_io_saphir(cs); | 294 | release_io_saphir(cs); |
295 | return (0); | 295 | return (0); |
296 | } | 296 | } |