aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/avm_a1p.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/avm_a1p.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/avm_a1p.c')
-rw-r--r--drivers/isdn/hisax/avm_a1p.c152
1 files changed, 76 insertions, 76 deletions
diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
index 3039c6d68fc4..39347198d643 100644
--- a/drivers/isdn/hisax/avm_a1p.c
+++ b/drivers/isdn/hisax/avm_a1p.c
@@ -39,7 +39,7 @@
39#define ASL0_R_ISAC 0x20 /* active low */ 39#define ASL0_R_ISAC 0x20 /* active low */
40#define ASL0_R_HSCX 0x40 /* active low */ 40#define ASL0_R_HSCX 0x40 /* active low */
41#define ASL0_R_TESTBIT 0x80 41#define ASL0_R_TESTBIT 0x80
42#define ASL0_R_IRQPENDING (ASL0_R_ISAC|ASL0_R_HSCX|ASL0_R_TIMER) 42#define ASL0_R_IRQPENDING (ASL0_R_ISAC | ASL0_R_HSCX | ASL0_R_TIMER)
43 43
44/* write bits ASL0 */ 44/* write bits ASL0 */
45#define ASL0_W_RESET 0x01 45#define ASL0_W_RESET 0x01
@@ -52,8 +52,8 @@
52#define ASL1_W_LED0 0x10 52#define ASL1_W_LED0 0x10
53#define ASL1_W_LED1 0x20 53#define ASL1_W_LED1 0x20
54#define ASL1_W_ENABLE_S0 0xC0 54#define ASL1_W_ENABLE_S0 0xC0
55 55
56#define byteout(addr,val) outb(val,addr) 56#define byteout(addr, val) outb(val, addr)
57#define bytein(addr) inb(addr) 57#define bytein(addr) inb(addr)
58 58
59static const char *avm_revision = "$Revision: 2.9.2.5 $"; 59static const char *avm_revision = "$Revision: 2.9.2.5 $";
@@ -61,34 +61,34 @@ static const char *avm_revision = "$Revision: 2.9.2.5 $";
61static inline u_char 61static inline u_char
62ReadISAC(struct IsdnCardState *cs, u_char offset) 62ReadISAC(struct IsdnCardState *cs, u_char offset)
63{ 63{
64 u_char ret; 64 u_char ret;
65 65
66 offset -= 0x20; 66 offset -= 0x20;
67 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_REG_OFFSET+offset); 67 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET, ISAC_REG_OFFSET + offset);
68 ret = bytein(cs->hw.avm.cfg_reg+DATAREG_OFFSET); 68 ret = bytein(cs->hw.avm.cfg_reg + DATAREG_OFFSET);
69 return ret; 69 return ret;
70} 70}
71 71
72static inline void 72static inline void
73WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) 73WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
74{ 74{
75 offset -= 0x20; 75 offset -= 0x20;
76 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_REG_OFFSET+offset); 76 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET, ISAC_REG_OFFSET + offset);
77 byteout(cs->hw.avm.cfg_reg+DATAREG_OFFSET, value); 77 byteout(cs->hw.avm.cfg_reg + DATAREG_OFFSET, value);
78} 78}
79 79
80static inline void 80static inline void
81ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) 81ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size)
82{ 82{
83 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_FIFO_OFFSET); 83 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET, ISAC_FIFO_OFFSET);
84 insb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size); 84 insb(cs->hw.avm.cfg_reg + DATAREG_OFFSET, data, size);
85} 85}
86 86
87static inline void 87static inline void
88WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) 88WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size)
89{ 89{
90 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_FIFO_OFFSET); 90 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET, ISAC_FIFO_OFFSET);
91 outsb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size); 91 outsb(cs->hw.avm.cfg_reg + DATAREG_OFFSET, data, size);
92} 92}
93 93
94static inline u_char 94static inline u_char
@@ -96,36 +96,36 @@ ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
96{ 96{
97 u_char ret; 97 u_char ret;
98 98
99 offset -= 0x20; 99 offset -= 0x20;
100 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET, 100 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET,
101 HSCX_REG_OFFSET+hscx*HSCX_CH_DIFF+offset); 101 HSCX_REG_OFFSET + hscx * HSCX_CH_DIFF + offset);
102 ret = bytein(cs->hw.avm.cfg_reg+DATAREG_OFFSET); 102 ret = bytein(cs->hw.avm.cfg_reg + DATAREG_OFFSET);
103 return ret; 103 return ret;
104} 104}
105 105
106static inline void 106static inline void
107WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) 107WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
108{ 108{
109 offset -= 0x20; 109 offset -= 0x20;
110 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET, 110 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET,
111 HSCX_REG_OFFSET+hscx*HSCX_CH_DIFF+offset); 111 HSCX_REG_OFFSET + hscx * HSCX_CH_DIFF + offset);
112 byteout(cs->hw.avm.cfg_reg+DATAREG_OFFSET, value); 112 byteout(cs->hw.avm.cfg_reg + DATAREG_OFFSET, value);
113} 113}
114 114
115static inline void 115static inline void
116ReadHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size) 116ReadHSCXfifo(struct IsdnCardState *cs, int hscx, u_char *data, int size)
117{ 117{
118 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET, 118 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET,
119 HSCX_FIFO_OFFSET+hscx*HSCX_CH_DIFF); 119 HSCX_FIFO_OFFSET + hscx * HSCX_CH_DIFF);
120 insb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size); 120 insb(cs->hw.avm.cfg_reg + DATAREG_OFFSET, data, size);
121} 121}
122 122
123static inline void 123static inline void
124WriteHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size) 124WriteHSCXfifo(struct IsdnCardState *cs, int hscx, u_char *data, int size)
125{ 125{
126 byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET, 126 byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET,
127 HSCX_FIFO_OFFSET+hscx*HSCX_CH_DIFF); 127 HSCX_FIFO_OFFSET + hscx * HSCX_CH_DIFF);
128 outsb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size); 128 outsb(cs->hw.avm.cfg_reg + DATAREG_OFFSET, data, size);
129} 129}
130 130
131/* 131/*
@@ -134,7 +134,7 @@ WriteHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
134 134
135#define READHSCX(cs, nr, reg) ReadHSCX(cs, nr, reg) 135#define READHSCX(cs, nr, reg) ReadHSCX(cs, nr, reg)
136#define WRITEHSCX(cs, nr, reg, data) WriteHSCX(cs, nr, reg, data) 136#define WRITEHSCX(cs, nr, reg, data) WriteHSCX(cs, nr, reg, data)
137#define READHSCXFIFO(cs, nr, ptr, cnt) ReadHSCXfifo(cs, nr, ptr, cnt) 137#define READHSCXFIFO(cs, nr, ptr, cnt) ReadHSCXfifo(cs, nr, ptr, cnt)
138#define WRITEHSCXFIFO(cs, nr, ptr, cnt) WriteHSCXfifo(cs, nr, ptr, cnt) 138#define WRITEHSCXFIFO(cs, nr, ptr, cnt) WriteHSCXfifo(cs, nr, ptr, cnt)
139 139
140#include "hscx_irq.c" 140#include "hscx_irq.c"
@@ -147,11 +147,11 @@ avm_a1p_interrupt(int intno, void *dev_id)
147 u_long flags; 147 u_long flags;
148 148
149 spin_lock_irqsave(&cs->lock, flags); 149 spin_lock_irqsave(&cs->lock, flags);
150 while ((sval = (~bytein(cs->hw.avm.cfg_reg+ASL0_OFFSET) & ASL0_R_IRQPENDING))) { 150 while ((sval = (~bytein(cs->hw.avm.cfg_reg + ASL0_OFFSET) & ASL0_R_IRQPENDING))) {
151 if (cs->debug & L1_DEB_INTSTAT) 151 if (cs->debug & L1_DEB_INTSTAT)
152 debugl1(cs, "avm IntStatus %x", sval); 152 debugl1(cs, "avm IntStatus %x", sval);
153 if (sval & ASL0_R_HSCX) { 153 if (sval & ASL0_R_HSCX) {
154 val = ReadHSCX(cs, 1, HSCX_ISTA); 154 val = ReadHSCX(cs, 1, HSCX_ISTA);
155 if (val) 155 if (val)
156 hscx_int_main(cs, val); 156 hscx_int_main(cs, val);
157 } 157 }
@@ -177,38 +177,38 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
177 u_long flags; 177 u_long flags;
178 178
179 switch (mt) { 179 switch (mt) {
180 case CARD_RESET: 180 case CARD_RESET:
181 spin_lock_irqsave(&cs->lock, flags); 181 spin_lock_irqsave(&cs->lock, flags);
182 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,0x00); 182 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, 0x00);
183 HZDELAY(HZ / 5 + 1); 183 HZDELAY(HZ / 5 + 1);
184 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,ASL0_W_RESET); 184 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, ASL0_W_RESET);
185 HZDELAY(HZ / 5 + 1); 185 HZDELAY(HZ / 5 + 1);
186 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,0x00); 186 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, 0x00);
187 spin_unlock_irqrestore(&cs->lock, flags); 187 spin_unlock_irqrestore(&cs->lock, flags);
188 return 0; 188 return 0;
189 189
190 case CARD_RELEASE: 190 case CARD_RELEASE:
191 /* free_irq is done in HiSax_closecard(). */ 191 /* free_irq is done in HiSax_closecard(). */
192 /* free_irq(cs->irq, cs); */ 192 /* free_irq(cs->irq, cs); */
193 return 0; 193 return 0;
194 194
195 case CARD_INIT: 195 case CARD_INIT:
196 spin_lock_irqsave(&cs->lock, flags); 196 spin_lock_irqsave(&cs->lock, flags);
197 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,ASL0_W_TDISABLE|ASL0_W_TRESET|ASL0_W_IRQENABLE); 197 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, ASL0_W_TDISABLE | ASL0_W_TRESET | ASL0_W_IRQENABLE);
198 clear_pending_isac_ints(cs); 198 clear_pending_isac_ints(cs);
199 clear_pending_hscx_ints(cs); 199 clear_pending_hscx_ints(cs);
200 inithscxisac(cs, 1); 200 inithscxisac(cs, 1);
201 inithscxisac(cs, 2); 201 inithscxisac(cs, 2);
202 spin_unlock_irqrestore(&cs->lock, flags); 202 spin_unlock_irqrestore(&cs->lock, flags);
203 return 0; 203 return 0;
204 204
205 case CARD_TEST: 205 case CARD_TEST:
206 /* we really don't need it for the PCMCIA Version */ 206 /* we really don't need it for the PCMCIA Version */
207 return 0; 207 return 0;
208 208
209 default: 209 default:
210 /* all card drivers ignore others, so we do the same */ 210 /* all card drivers ignore others, so we do the same */
211 return 0; 211 return 0;
212 } 212 }
213 return 0; 213 return 0;
214} 214}
@@ -222,7 +222,7 @@ int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card)
222 222
223 strcpy(tmp, avm_revision); 223 strcpy(tmp, avm_revision);
224 printk(KERN_INFO "HiSax: AVM A1 PCMCIA driver Rev. %s\n", 224 printk(KERN_INFO "HiSax: AVM A1 PCMCIA driver Rev. %s\n",
225 HiSax_getrev(tmp)); 225 HiSax_getrev(tmp));
226 if (cs->typ != ISDN_CTYPE_A1_PCMCIA) 226 if (cs->typ != ISDN_CTYPE_A1_PCMCIA)
227 return (0); 227 return (0);
228 228
@@ -230,20 +230,20 @@ int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card)
230 cs->irq = card->para[0]; 230 cs->irq = card->para[0];
231 231
232 232
233 byteout(cs->hw.avm.cfg_reg+ASL1_OFFSET, ASL1_W_ENABLE_S0); 233 byteout(cs->hw.avm.cfg_reg + ASL1_OFFSET, ASL1_W_ENABLE_S0);
234 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,0x00); 234 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, 0x00);
235 HZDELAY(HZ / 5 + 1); 235 HZDELAY(HZ / 5 + 1);
236 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,ASL0_W_RESET); 236 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, ASL0_W_RESET);
237 HZDELAY(HZ / 5 + 1); 237 HZDELAY(HZ / 5 + 1);
238 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,0x00); 238 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, 0x00);
239 239
240 byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET, ASL0_W_TDISABLE|ASL0_W_TRESET); 240 byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, ASL0_W_TDISABLE | ASL0_W_TRESET);
241 241
242 model = bytein(cs->hw.avm.cfg_reg+MODREG_OFFSET); 242 model = bytein(cs->hw.avm.cfg_reg + MODREG_OFFSET);
243 vers = bytein(cs->hw.avm.cfg_reg+VERREG_OFFSET); 243 vers = bytein(cs->hw.avm.cfg_reg + VERREG_OFFSET);
244 244
245 printk(KERN_INFO "AVM A1 PCMCIA: io 0x%x irq %d model %d version %d\n", 245 printk(KERN_INFO "AVM A1 PCMCIA: io 0x%x irq %d model %d version %d\n",
246 cs->hw.avm.cfg_reg, cs->irq, model, vers); 246 cs->hw.avm.cfg_reg, cs->irq, model, vers);
247 247
248 setup_isac(cs); 248 setup_isac(cs);
249 cs->readisac = &ReadISAC; 249 cs->readisac = &ReadISAC;