diff options
author | Joe Perches <joe@perches.com> | 2012-02-20 07:52:38 +0400 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2012-02-21 21:04:01 +0400 |
commit | 475be4d85a274d0961593db41cf85689db1d583c (patch) | |
tree | b2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hisax/s0box.c | |
parent | 0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff) | |
download | linux-475be4d85a274d0961593db41cf85689db1d583c.tar.xz |
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/s0box.c')
-rw-r--r-- | drivers/isdn/hisax/s0box.c | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c index 16d00b555c8c..383c4e7ce50b 100644 --- a/drivers/isdn/hisax/s0box.c +++ b/drivers/isdn/hisax/s0box.c @@ -20,73 +20,73 @@ static const char *s0box_revision = "$Revision: 2.6.2.4 $"; static inline void writereg(unsigned int padr, signed int addr, u_char off, u_char val) { - outb_p(0x1c,padr+2); - outb_p(0x14,padr+2); - outb_p((addr+off)&0x7f,padr); - outb_p(0x16,padr+2); - outb_p(val,padr); - outb_p(0x17,padr+2); - outb_p(0x14,padr+2); - outb_p(0x1c,padr+2); + outb_p(0x1c, padr + 2); + outb_p(0x14, padr + 2); + outb_p((addr + off) & 0x7f, padr); + outb_p(0x16, padr + 2); + outb_p(val, padr); + outb_p(0x17, padr + 2); + outb_p(0x14, padr + 2); + outb_p(0x1c, padr + 2); } static u_char nibtab[] = { 1, 9, 5, 0xd, 3, 0xb, 7, 0xf, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 4, 0xc, 2, 0xa, 6, 0xe } ; + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 4, 0xc, 2, 0xa, 6, 0xe }; static inline u_char readreg(unsigned int padr, signed int addr, u_char off) { register u_char n1, n2; - outb_p(0x1c,padr+2); - outb_p(0x14,padr+2); - outb_p((addr+off)|0x80,padr); - outb_p(0x16,padr+2); - outb_p(0x17,padr+2); - n1 = (inb_p(padr+1) >> 3) & 0x17; - outb_p(0x16,padr+2); - n2 = (inb_p(padr+1) >> 3) & 0x17; - outb_p(0x14,padr+2); - outb_p(0x1c,padr+2); + outb_p(0x1c, padr + 2); + outb_p(0x14, padr + 2); + outb_p((addr + off) | 0x80, padr); + outb_p(0x16, padr + 2); + outb_p(0x17, padr + 2); + n1 = (inb_p(padr + 1) >> 3) & 0x17; + outb_p(0x16, padr + 2); + n2 = (inb_p(padr + 1) >> 3) & 0x17; + outb_p(0x14, padr + 2); + outb_p(0x1c, padr + 2); return nibtab[n1] | (nibtab[n2] << 4); } static inline void -read_fifo(unsigned int padr, signed int adr, u_char * data, int size) +read_fifo(unsigned int padr, signed int adr, u_char *data, int size) { int i; register u_char n1, n2; - - outb_p(0x1c, padr+2); - outb_p(0x14, padr+2); - outb_p(adr|0x80, padr); - outb_p(0x16, padr+2); - for (i=0; i<size; i++) { - outb_p(0x17, padr+2); - n1 = (inb_p(padr+1) >> 3) & 0x17; - outb_p(0x16,padr+2); - n2 = (inb_p(padr+1) >> 3) & 0x17; - *(data++)=nibtab[n1] | (nibtab[n2] << 4); + + outb_p(0x1c, padr + 2); + outb_p(0x14, padr + 2); + outb_p(adr | 0x80, padr); + outb_p(0x16, padr + 2); + for (i = 0; i < size; i++) { + outb_p(0x17, padr + 2); + n1 = (inb_p(padr + 1) >> 3) & 0x17; + outb_p(0x16, padr + 2); + n2 = (inb_p(padr + 1) >> 3) & 0x17; + *(data++) = nibtab[n1] | (nibtab[n2] << 4); } - outb_p(0x14,padr+2); - outb_p(0x1c,padr+2); + outb_p(0x14, padr + 2); + outb_p(0x1c, padr + 2); return; } static inline void -write_fifo(unsigned int padr, signed int adr, u_char * data, int size) +write_fifo(unsigned int padr, signed int adr, u_char *data, int size) { int i; - outb_p(0x1c, padr+2); - outb_p(0x14, padr+2); - outb_p(adr&0x7f, padr); - for (i=0; i<size; i++) { - outb_p(0x16, padr+2); + outb_p(0x1c, padr + 2); + outb_p(0x14, padr + 2); + outb_p(adr & 0x7f, padr); + for (i = 0; i < size; i++) { + outb_p(0x16, padr + 2); outb_p(*(data++), padr); - outb_p(0x17, padr+2); + outb_p(0x17, padr + 2); } - outb_p(0x14,padr+2); - outb_p(0x1c,padr+2); + outb_p(0x14, padr + 2); + outb_p(0x1c, padr + 2); return; } @@ -105,13 +105,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) } static void -ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) +ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) { read_fifo(cs->hw.teles3.cfg_reg, cs->hw.teles3.isacfifo, data, size); } static void -WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) +WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) { write_fifo(cs->hw.teles3.cfg_reg, cs->hw.teles3.isacfifo, data, size); } @@ -150,11 +150,11 @@ s0box_interrupt(int intno, void *dev_id) spin_lock_irqsave(&cs->lock, flags); val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_ISTA); - Start_HSCX: +Start_HSCX: if (val) hscx_int_main(cs, val); val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_ISTA); - Start_ISAC: +Start_ISAC: if (val) isac_interrupt(cs, val); count++; @@ -194,20 +194,20 @@ S0Box_card_msg(struct IsdnCardState *cs, int mt, void *arg) u_long flags; switch (mt) { - case CARD_RESET: - break; - case CARD_RELEASE: - release_io_s0box(cs); - break; - case CARD_INIT: - spin_lock_irqsave(&cs->lock, flags); - inithscxisac(cs, 3); - spin_unlock_irqrestore(&cs->lock, flags); - break; - case CARD_TEST: - break; + case CARD_RESET: + break; + case CARD_RELEASE: + release_io_s0box(cs); + break; + case CARD_INIT: + spin_lock_irqsave(&cs->lock, flags); + inithscxisac(cs, 3); + spin_unlock_irqrestore(&cs->lock, flags); + break; + case CARD_TEST: + break; } - return(0); + return (0); } int __devinit @@ -229,17 +229,17 @@ setup_s0box(struct IsdnCard *card) cs->hw.teles3.hscxfifo[0] = cs->hw.teles3.hscx[0] + 0x3e; cs->hw.teles3.hscxfifo[1] = cs->hw.teles3.hscx[1] + 0x3e; cs->irq = card->para[0]; - if (!request_region(cs->hw.teles3.cfg_reg,8, "S0Box parallel I/O")) { + if (!request_region(cs->hw.teles3.cfg_reg, 8, "S0Box parallel I/O")) { printk(KERN_WARNING "HiSax: S0Box ports %x-%x already in use\n", - cs->hw.teles3.cfg_reg, - cs->hw.teles3.cfg_reg + 7); + cs->hw.teles3.cfg_reg, + cs->hw.teles3.cfg_reg + 7); return 0; } printk(KERN_INFO "HiSax: S0Box config irq:%d isac:0x%x cfg:0x%x\n", - cs->irq, - cs->hw.teles3.isac, cs->hw.teles3.cfg_reg); + cs->irq, + cs->hw.teles3.isac, cs->hw.teles3.cfg_reg); printk(KERN_INFO "HiSax: hscx A:0x%x hscx B:0x%x\n", - cs->hw.teles3.hscx[0], cs->hw.teles3.hscx[1]); + cs->hw.teles3.hscx[0], cs->hw.teles3.hscx[1]); setup_isac(cs); cs->readisac = &ReadISAC; cs->writeisac = &WriteISAC; |