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/sportster.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/sportster.c')
-rw-r--r-- | drivers/isdn/hisax/sportster.c | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c index 0a53759adfa4..1267298ef551 100644 --- a/drivers/isdn/hisax/sportster.c +++ b/drivers/isdn/hisax/sportster.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 const char *sportster_revision = "$Revision: 1.16.2.4 $"; | 21 | static const char *sportster_revision = "$Revision: 1.16.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 SPORTSTER_ISAC 0xC000 | 26 | #define SPORTSTER_ISAC 0xC000 |
@@ -33,17 +33,17 @@ static const char *sportster_revision = "$Revision: 1.16.2.4 $"; | |||
33 | static inline int | 33 | static inline int |
34 | calc_off(unsigned int base, unsigned int off) | 34 | calc_off(unsigned int base, unsigned int off) |
35 | { | 35 | { |
36 | return(base + ((off & 0xfc)<<8) + ((off & 3)<<1)); | 36 | return (base + ((off & 0xfc) << 8) + ((off & 3) << 1)); |
37 | } | 37 | } |
38 | 38 | ||
39 | static inline void | 39 | static inline void |
40 | read_fifo(unsigned int adr, u_char * data, int size) | 40 | read_fifo(unsigned int adr, u_char *data, int size) |
41 | { | 41 | { |
42 | insb(adr, data, size); | 42 | insb(adr, data, size); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void | 45 | static void |
46 | write_fifo(unsigned int adr, u_char * data, int size) | 46 | write_fifo(unsigned int adr, u_char *data, int size) |
47 | { | 47 | { |
48 | outsb(adr, data, size); | 48 | outsb(adr, data, size); |
49 | } | 49 | } |
@@ -63,13 +63,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) | |||
63 | } | 63 | } |
64 | 64 | ||
65 | static void | 65 | static void |
66 | ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 66 | ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
67 | { | 67 | { |
68 | read_fifo(cs->hw.spt.isac, data, size); | 68 | read_fifo(cs->hw.spt.isac, data, size); |
69 | } | 69 | } |
70 | 70 | ||
71 | static void | 71 | static void |
72 | WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) | 72 | WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) |
73 | { | 73 | { |
74 | write_fifo(cs->hw.spt.isac, data, size); | 74 | write_fifo(cs->hw.spt.isac, data, size); |
75 | } | 75 | } |
@@ -106,11 +106,11 @@ sportster_interrupt(int intno, void *dev_id) | |||
106 | 106 | ||
107 | spin_lock_irqsave(&cs->lock, flags); | 107 | spin_lock_irqsave(&cs->lock, flags); |
108 | val = READHSCX(cs, 1, HSCX_ISTA); | 108 | val = READHSCX(cs, 1, HSCX_ISTA); |
109 | Start_HSCX: | 109 | Start_HSCX: |
110 | if (val) | 110 | if (val) |
111 | hscx_int_main(cs, val); | 111 | hscx_int_main(cs, val); |
112 | val = ReadISAC(cs, ISAC_ISTA); | 112 | val = ReadISAC(cs, ISAC_ISTA); |
113 | Start_ISAC: | 113 | Start_ISAC: |
114 | if (val) | 114 | if (val) |
115 | isac_interrupt(cs, val); | 115 | isac_interrupt(cs, val); |
116 | val = READHSCX(cs, 1, HSCX_ISTA); | 116 | val = READHSCX(cs, 1, HSCX_ISTA); |
@@ -126,7 +126,7 @@ sportster_interrupt(int intno, void *dev_id) | |||
126 | goto Start_ISAC; | 126 | goto Start_ISAC; |
127 | } | 127 | } |
128 | /* get a new irq impulse if there any pending */ | 128 | /* get a new irq impulse if there any pending */ |
129 | bytein(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ +1); | 129 | bytein(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ + 1); |
130 | spin_unlock_irqrestore(&cs->lock, flags); | 130 | spin_unlock_irqrestore(&cs->lock, flags); |
131 | return IRQ_HANDLED; | 131 | return IRQ_HANDLED; |
132 | } | 132 | } |
@@ -137,8 +137,8 @@ release_io_sportster(struct IsdnCardState *cs) | |||
137 | int i, adr; | 137 | int i, adr; |
138 | 138 | ||
139 | byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, 0); | 139 | byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, 0); |
140 | for (i=0; i<64; i++) { | 140 | for (i = 0; i < 64; i++) { |
141 | adr = cs->hw.spt.cfg_reg + i *1024; | 141 | adr = cs->hw.spt.cfg_reg + i * 1024; |
142 | release_region(adr, 8); | 142 | release_region(adr, 8); |
143 | } | 143 | } |
144 | } | 144 | } |
@@ -160,51 +160,51 @@ Sportster_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
160 | u_long flags; | 160 | u_long flags; |
161 | 161 | ||
162 | switch (mt) { | 162 | switch (mt) { |
163 | case CARD_RESET: | 163 | case CARD_RESET: |
164 | spin_lock_irqsave(&cs->lock, flags); | 164 | spin_lock_irqsave(&cs->lock, flags); |
165 | reset_sportster(cs); | 165 | reset_sportster(cs); |
166 | spin_unlock_irqrestore(&cs->lock, flags); | 166 | spin_unlock_irqrestore(&cs->lock, flags); |
167 | return(0); | 167 | return (0); |
168 | case CARD_RELEASE: | 168 | case CARD_RELEASE: |
169 | release_io_sportster(cs); | 169 | release_io_sportster(cs); |
170 | return(0); | 170 | return (0); |
171 | case CARD_INIT: | 171 | case CARD_INIT: |
172 | spin_lock_irqsave(&cs->lock, flags); | 172 | spin_lock_irqsave(&cs->lock, flags); |
173 | reset_sportster(cs); | 173 | reset_sportster(cs); |
174 | inithscxisac(cs, 1); | 174 | inithscxisac(cs, 1); |
175 | cs->hw.spt.res_irq |= SPORTSTER_INTE; /* IRQ On */ | 175 | cs->hw.spt.res_irq |= SPORTSTER_INTE; /* IRQ On */ |
176 | byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq); | 176 | byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq); |
177 | inithscxisac(cs, 2); | 177 | inithscxisac(cs, 2); |
178 | spin_unlock_irqrestore(&cs->lock, flags); | 178 | spin_unlock_irqrestore(&cs->lock, flags); |
179 | return(0); | 179 | return (0); |
180 | case CARD_TEST: | 180 | case CARD_TEST: |
181 | return(0); | 181 | return (0); |
182 | } | 182 | } |
183 | return(0); | 183 | return (0); |
184 | } | 184 | } |
185 | 185 | ||
186 | static int __devinit | 186 | static int __devinit |
187 | get_io_range(struct IsdnCardState *cs) | 187 | get_io_range(struct IsdnCardState *cs) |
188 | { | 188 | { |
189 | int i, j, adr; | 189 | int i, j, adr; |
190 | 190 | ||
191 | for (i=0;i<64;i++) { | 191 | for (i = 0; i < 64; i++) { |
192 | adr = cs->hw.spt.cfg_reg + i *1024; | 192 | adr = cs->hw.spt.cfg_reg + i * 1024; |
193 | if (!request_region(adr, 8, "sportster")) { | 193 | if (!request_region(adr, 8, "sportster")) { |
194 | printk(KERN_WARNING "HiSax: USR Sportster config port " | 194 | printk(KERN_WARNING "HiSax: USR Sportster config port " |
195 | "%x-%x already in use\n", | 195 | "%x-%x already in use\n", |
196 | adr, adr + 8); | 196 | adr, adr + 8); |
197 | break; | 197 | break; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | if (i==64) | 200 | if (i == 64) |
201 | return(1); | 201 | return (1); |
202 | else { | 202 | else { |
203 | for (j=0; j<i; j++) { | 203 | for (j = 0; j < i; j++) { |
204 | adr = cs->hw.spt.cfg_reg + j *1024; | 204 | adr = cs->hw.spt.cfg_reg + j * 1024; |
205 | release_region(adr, 8); | 205 | release_region(adr, 8); |
206 | } | 206 | } |
207 | return(0); | 207 | return (0); |
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
@@ -226,28 +226,28 @@ setup_sportster(struct IsdnCard *card) | |||
226 | cs->hw.spt.isac = cs->hw.spt.cfg_reg + SPORTSTER_ISAC; | 226 | cs->hw.spt.isac = cs->hw.spt.cfg_reg + SPORTSTER_ISAC; |
227 | cs->hw.spt.hscx[0] = cs->hw.spt.cfg_reg + SPORTSTER_HSCXA; | 227 | cs->hw.spt.hscx[0] = cs->hw.spt.cfg_reg + SPORTSTER_HSCXA; |
228 | cs->hw.spt.hscx[1] = cs->hw.spt.cfg_reg + SPORTSTER_HSCXB; | 228 | cs->hw.spt.hscx[1] = cs->hw.spt.cfg_reg + SPORTSTER_HSCXB; |
229 | 229 | ||
230 | switch(cs->irq) { | 230 | switch (cs->irq) { |
231 | case 5: cs->hw.spt.res_irq = 1; | 231 | case 5: cs->hw.spt.res_irq = 1; |
232 | break; | 232 | break; |
233 | case 7: cs->hw.spt.res_irq = 2; | 233 | case 7: cs->hw.spt.res_irq = 2; |
234 | break; | 234 | break; |
235 | case 10:cs->hw.spt.res_irq = 3; | 235 | case 10:cs->hw.spt.res_irq = 3; |
236 | break; | 236 | break; |
237 | case 11:cs->hw.spt.res_irq = 4; | 237 | case 11:cs->hw.spt.res_irq = 4; |
238 | break; | 238 | break; |
239 | case 12:cs->hw.spt.res_irq = 5; | 239 | case 12:cs->hw.spt.res_irq = 5; |
240 | break; | 240 | break; |
241 | case 14:cs->hw.spt.res_irq = 6; | 241 | case 14:cs->hw.spt.res_irq = 6; |
242 | break; | 242 | break; |
243 | case 15:cs->hw.spt.res_irq = 7; | 243 | case 15:cs->hw.spt.res_irq = 7; |
244 | break; | 244 | break; |
245 | default:release_io_sportster(cs); | 245 | default:release_io_sportster(cs); |
246 | printk(KERN_WARNING "Sportster: wrong IRQ\n"); | 246 | printk(KERN_WARNING "Sportster: wrong IRQ\n"); |
247 | return(0); | 247 | return (0); |
248 | } | 248 | } |
249 | printk(KERN_INFO "HiSax: USR Sportster config irq:%d cfg:0x%X\n", | 249 | printk(KERN_INFO "HiSax: USR Sportster config irq:%d cfg:0x%X\n", |
250 | cs->irq, cs->hw.spt.cfg_reg); | 250 | cs->irq, cs->hw.spt.cfg_reg); |
251 | setup_isac(cs); | 251 | setup_isac(cs); |
252 | cs->readisac = &ReadISAC; | 252 | cs->readisac = &ReadISAC; |
253 | cs->writeisac = &WriteISAC; | 253 | cs->writeisac = &WriteISAC; |