aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/avma1_cs.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/avma1_cs.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/avma1_cs.c')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c124
1 files changed, 62 insertions, 62 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 8f0ad2a52e87..33e3c94887d8 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Author Carsten Paeth 4 * Author Carsten Paeth
5 * Copyright 1998-2001 by Carsten Paeth <calle@calle.in-berlin.de> 5 * Copyright 1998-2001 by Carsten Paeth <calle@calle.in-berlin.de>
6 * 6 *
7 * This software may be used and distributed according to the terms 7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference. 8 * of the GNU General Public License, incorporated herein by reference.
9 * 9 *
@@ -39,20 +39,20 @@ module_param(isdnprot, int, 0);
39 39
40/*====================================================================*/ 40/*====================================================================*/
41 41
42static int avma1cs_config(struct pcmcia_device *link) __devinit ; 42static int avma1cs_config(struct pcmcia_device *link) __devinit;
43static void avma1cs_release(struct pcmcia_device *link); 43static void avma1cs_release(struct pcmcia_device *link);
44static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit ; 44static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit;
45 45
46static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) 46static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
47{ 47{
48 dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); 48 dev_dbg(&p_dev->dev, "avma1cs_attach()\n");
49 49
50 /* General socket configuration */ 50 /* General socket configuration */
51 p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; 51 p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
52 p_dev->config_index = 1; 52 p_dev->config_index = 1;
53 p_dev->config_regs = PRESENT_OPTION; 53 p_dev->config_regs = PRESENT_OPTION;
54 54
55 return avma1cs_config(p_dev); 55 return avma1cs_config(p_dev);
56} /* avma1cs_attach */ 56} /* avma1cs_attach */
57 57
58static void __devexit avma1cs_detach(struct pcmcia_device *link) 58static void __devexit avma1cs_detach(struct pcmcia_device *link)
@@ -75,63 +75,63 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
75 75
76static int __devinit avma1cs_config(struct pcmcia_device *link) 76static int __devinit avma1cs_config(struct pcmcia_device *link)
77{ 77{
78 int i = -1; 78 int i = -1;
79 char devname[128]; 79 char devname[128];
80 IsdnCard_t icard; 80 IsdnCard_t icard;
81 int busy = 0; 81 int busy = 0;
82 82
83 dev_dbg(&link->dev, "avma1cs_config(0x%p)\n", link); 83 dev_dbg(&link->dev, "avma1cs_config(0x%p)\n", link);
84 84
85 devname[0] = 0; 85 devname[0] = 0;
86 if (link->prod_id[1]) 86 if (link->prod_id[1])
87 strlcpy(devname, link->prod_id[1], sizeof(devname)); 87 strlcpy(devname, link->prod_id[1], sizeof(devname));
88 88
89 if (pcmcia_loop_config(link, avma1cs_configcheck, NULL)) 89 if (pcmcia_loop_config(link, avma1cs_configcheck, NULL))
90 return -ENODEV; 90 return -ENODEV;
91 91
92 do { 92 do {
93 /* 93 /*
94 * allocate an interrupt line 94 * allocate an interrupt line
95 */ 95 */
96 if (!link->irq) { 96 if (!link->irq) {
97 /* undo */ 97 /* undo */
98 pcmcia_disable_device(link); 98 pcmcia_disable_device(link);
99 break; 99 break;
100 } 100 }
101 101
102 /* 102 /*
103 * configure the PCMCIA socket 103 * configure the PCMCIA socket
104 */ 104 */
105 i = pcmcia_enable_device(link); 105 i = pcmcia_enable_device(link);
106 if (i != 0) {
107 pcmcia_disable_device(link);
108 break;
109 }
110
111 } while (0);
112
113 /* If any step failed, release any partially configured state */
106 if (i != 0) { 114 if (i != 0) {
107 pcmcia_disable_device(link); 115 avma1cs_release(link);
108 break; 116 return -ENODEV;
109 } 117 }
110 118
111 } while (0); 119 icard.para[0] = link->irq;
112 120 icard.para[1] = link->resource[0]->start;
113 /* If any step failed, release any partially configured state */ 121 icard.protocol = isdnprot;
114 if (i != 0) { 122 icard.typ = ISDN_CTYPE_A1_PCMCIA;
115 avma1cs_release(link); 123
116 return -ENODEV; 124 i = hisax_init_pcmcia(link, &busy, &icard);
117 } 125 if (i < 0) {
118 126 printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 "
119 icard.para[0] = link->irq; 127 "PCMCIA %d at i/o %#x\n", i,
120 icard.para[1] = link->resource[0]->start; 128 (unsigned int) link->resource[0]->start);
121 icard.protocol = isdnprot; 129 avma1cs_release(link);
122 icard.typ = ISDN_CTYPE_A1_PCMCIA; 130 return -ENODEV;
123 131 }
124 i = hisax_init_pcmcia(link, &busy, &icard); 132 link->priv = (void *) (unsigned long) i;
125 if (i < 0) {
126 printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 "
127 "PCMCIA %d at i/o %#x\n", i,
128 (unsigned int) link->resource[0]->start);
129 avma1cs_release(link);
130 return -ENODEV;
131 }
132 link->priv = (void *) (unsigned long) i;
133 133
134 return 0; 134 return 0;
135} /* avma1cs_config */ 135} /* avma1cs_config */
136 136
137static void avma1cs_release(struct pcmcia_device *link) 137static void avma1cs_release(struct pcmcia_device *link)