aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/jade_irq.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/jade_irq.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/jade_irq.c')
-rw-r--r--drivers/isdn/hisax/jade_irq.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/isdn/hisax/jade_irq.c b/drivers/isdn/hisax/jade_irq.c
index 1f201af15a0f..f521fc83dc76 100644
--- a/drivers/isdn/hisax/jade_irq.c
+++ b/drivers/isdn/hisax/jade_irq.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * Author Roland Klabunde 5 * Author Roland Klabunde
6 * Copyright by Roland Klabunde <R.Klabunde@Berkom.de> 6 * Copyright by Roland Klabunde <R.Klabunde@Berkom.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 *
@@ -13,21 +13,21 @@
13static inline void 13static inline void
14waitforCEC(struct IsdnCardState *cs, int jade, int reg) 14waitforCEC(struct IsdnCardState *cs, int jade, int reg)
15{ 15{
16 int to = 50; 16 int to = 50;
17 int mask = (reg == jade_HDLC_XCMD ? jadeSTAR_XCEC : jadeSTAR_RCEC); 17 int mask = (reg == jade_HDLC_XCMD ? jadeSTAR_XCEC : jadeSTAR_RCEC);
18 while ((READJADE(cs, jade, jade_HDLC_STAR) & mask) && to) { 18 while ((READJADE(cs, jade, jade_HDLC_STAR) & mask) && to) {
19 udelay(1); 19 udelay(1);
20 to--; 20 to--;
21 } 21 }
22 if (!to) 22 if (!to)
23 printk(KERN_WARNING "HiSax: waitforCEC (jade) timeout\n"); 23 printk(KERN_WARNING "HiSax: waitforCEC (jade) timeout\n");
24} 24}
25 25
26 26
27static inline void 27static inline void
28waitforXFW(struct IsdnCardState *cs, int jade) 28waitforXFW(struct IsdnCardState *cs, int jade)
29{ 29{
30 /* Does not work on older jade versions, don't care */ 30 /* Does not work on older jade versions, don't care */
31} 31}
32 32
33static inline void 33static inline void
@@ -98,7 +98,7 @@ jade_fill_fifo(struct BCState *bcs)
98 bcs->tx_cnt -= count; 98 bcs->tx_cnt -= count;
99 bcs->hw.hscx.count += count; 99 bcs->hw.hscx.count += count;
100 WRITEJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count); 100 WRITEJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count);
101 WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_XCMD, more ? jadeXCMD_XF : (jadeXCMD_XF|jadeXCMD_XME)); 101 WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_XCMD, more ? jadeXCMD_XF : (jadeXCMD_XF | jadeXCMD_XME));
102 if (cs->debug & L1_DEB_HSCX_FIFO) { 102 if (cs->debug & L1_DEB_HSCX_FIFO) {
103 char *t = bcs->blog; 103 char *t = bcs->blog;
104 104
@@ -119,7 +119,7 @@ jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
119 int fifo_size = 32; 119 int fifo_size = 32;
120 int count; 120 int count;
121 int i_jade = (int) jade; /* To satisfy the compiler */ 121 int i_jade = (int) jade; /* To satisfy the compiler */
122 122
123 if (!test_bit(BC_FLG_INIT, &bcs->Flag)) 123 if (!test_bit(BC_FLG_INIT, &bcs->Flag))
124 return; 124 return;
125 125
@@ -128,13 +128,13 @@ jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
128 if ((r & 0xf0) != 0xa0) { 128 if ((r & 0xf0) != 0xa0) {
129 if (!(r & 0x80)) 129 if (!(r & 0x80))
130 if (cs->debug & L1_DEB_WARN) 130 if (cs->debug & L1_DEB_WARN)
131 debugl1(cs, "JADE %s invalid frame", (jade ? "B":"A")); 131 debugl1(cs, "JADE %s invalid frame", (jade ? "B" : "A"));
132 if ((r & 0x40) && bcs->mode) 132 if ((r & 0x40) && bcs->mode)
133 if (cs->debug & L1_DEB_WARN) 133 if (cs->debug & L1_DEB_WARN)
134 debugl1(cs, "JADE %c RDO mode=%d", 'A'+jade, bcs->mode); 134 debugl1(cs, "JADE %c RDO mode=%d", 'A' + jade, bcs->mode);
135 if (!(r & 0x20)) 135 if (!(r & 0x20))
136 if (cs->debug & L1_DEB_WARN) 136 if (cs->debug & L1_DEB_WARN)
137 debugl1(cs, "JADE %c CRC error", 'A'+jade); 137 debugl1(cs, "JADE %c CRC error", 'A' + jade);
138 WriteJADECMDR(cs, jade, jade_HDLC_RCMD, jadeRCMD_RMC); 138 WriteJADECMDR(cs, jade, jade_HDLC_RCMD, jadeRCMD_RMC);
139 } else { 139 } else {
140 count = READJADE(cs, i_jade, jade_HDLC_RBCL) & 0x1F; 140 count = READJADE(cs, i_jade, jade_HDLC_RBCL) & 0x1F;
@@ -145,7 +145,7 @@ jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
145 if (cs->debug & L1_DEB_HSCX_FIFO) 145 if (cs->debug & L1_DEB_HSCX_FIFO)
146 debugl1(cs, "HX Frame %d", count); 146 debugl1(cs, "HX Frame %d", count);
147 if (!(skb = dev_alloc_skb(count))) 147 if (!(skb = dev_alloc_skb(count)))
148 printk(KERN_WARNING "JADE %s receive out of memory\n", (jade ? "B":"A")); 148 printk(KERN_WARNING "JADE %s receive out of memory\n", (jade ? "B" : "A"));
149 else { 149 else {
150 memcpy(skb_put(skb, count), bcs->hw.hscx.rcvbuf, count); 150 memcpy(skb_put(skb, count), bcs->hw.hscx.rcvbuf, count);
151 skb_queue_tail(&bcs->rqueue, skb); 151 skb_queue_tail(&bcs->rqueue, skb);
@@ -175,8 +175,8 @@ jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
175 jade_fill_fifo(bcs); 175 jade_fill_fifo(bcs);
176 return; 176 return;
177 } else { 177 } else {
178 if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag) && 178 if (test_bit(FLG_LLI_L1WAKEUP, &bcs->st->lli.flag) &&
179 (PACKET_NOACK != bcs->tx_skb->pkt_type)) { 179 (PACKET_NOACK != bcs->tx_skb->pkt_type)) {
180 u_long flags; 180 u_long flags;
181 spin_lock_irqsave(&bcs->aclock, flags); 181 spin_lock_irqsave(&bcs->aclock, flags);
182 bcs->ackcnt += bcs->hw.hscx.count; 182 bcs->ackcnt += bcs->hw.hscx.count;
@@ -204,7 +204,7 @@ jade_int_main(struct IsdnCardState *cs, u_char val, int jade)
204{ 204{
205 struct BCState *bcs; 205 struct BCState *bcs;
206 bcs = cs->bcs + jade; 206 bcs = cs->bcs + jade;
207 207
208 if (val & jadeISR_RFO) { 208 if (val & jadeISR_RFO) {
209 /* handled with RDO */ 209 /* handled with RDO */
210 val &= ~jadeISR_RFO; 210 val &= ~jadeISR_RFO;
@@ -216,21 +216,21 @@ jade_int_main(struct IsdnCardState *cs, u_char val, int jade)
216 jade_fill_fifo(bcs); 216 jade_fill_fifo(bcs);
217 else { 217 else {
218 /* Here we lost an TX interrupt, so 218 /* Here we lost an TX interrupt, so
219 * restart transmitting the whole frame. 219 * restart transmitting the whole frame.
220 */ 220 */
221 if (bcs->tx_skb) { 221 if (bcs->tx_skb) {
222 skb_push(bcs->tx_skb, bcs->hw.hscx.count); 222 skb_push(bcs->tx_skb, bcs->hw.hscx.count);
223 bcs->tx_cnt += bcs->hw.hscx.count; 223 bcs->tx_cnt += bcs->hw.hscx.count;
224 bcs->hw.hscx.count = 0; 224 bcs->hw.hscx.count = 0;
225 } 225 }
226 WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_XCMD, jadeXCMD_XRES); 226 WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_XCMD, jadeXCMD_XRES);
227 if (cs->debug & L1_DEB_WARN) 227 if (cs->debug & L1_DEB_WARN)
228 debugl1(cs, "JADE %c EXIR %x Lost TX", 'A'+jade, val); 228 debugl1(cs, "JADE %c EXIR %x Lost TX", 'A' + jade, val);
229 } 229 }
230 } 230 }
231 if (val & (jadeISR_RME|jadeISR_RPF|jadeISR_XPR)) { 231 if (val & (jadeISR_RME | jadeISR_RPF | jadeISR_XPR)) {
232 if (cs->debug & L1_DEB_HSCX) 232 if (cs->debug & L1_DEB_HSCX)
233 debugl1(cs, "JADE %c interrupt %x", 'A'+jade, val); 233 debugl1(cs, "JADE %c interrupt %x", 'A' + jade, val);
234 jade_interrupt(cs, val, jade); 234 jade_interrupt(cs, val, jade);
235 } 235 }
236} 236}