aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2009-10-24 09:50:13 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-09 02:29:59 -0500
commite773cfe167c320d07b9423bc51fc4ab0221775a4 (patch)
treee27b0b26b2c55c629100edaa73c7429ed7d41ee9 /drivers/isdn
parentcbf624f0e18c4a05219855663a3e5f9fe8f2d876 (diff)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (isdn)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of requiring manual settings of PCMCIA_DEBUG. Also, remove all usages of the CS_CHECK macro and replace them with proper Linux style calling and return value checking. The extra error reporting may be dropped, as the PCMCIA core already complains about any (non-driver-author) errors. CC: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c2
-rw-r--r--drivers/isdn/hisax/avma1_cs.c26
-rw-r--r--drivers/isdn/hisax/elsa_cs.c45
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c59
-rw-r--r--drivers/isdn/hisax/teles_cs.c37
5 files changed, 43 insertions, 126 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index c72565520e41..d388eadb9fdb 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -198,7 +198,6 @@ static int avmcs_config(struct pcmcia_device *link)
198 */ 198 */
199 i = pcmcia_request_irq(link, &link->irq); 199 i = pcmcia_request_irq(link, &link->irq);
200 if (i != 0) { 200 if (i != 0) {
201 cs_error(link, RequestIRQ, i);
202 /* undo */ 201 /* undo */
203 pcmcia_disable_device(link); 202 pcmcia_disable_device(link);
204 break; 203 break;
@@ -209,7 +208,6 @@ static int avmcs_config(struct pcmcia_device *link)
209 */ 208 */
210 i = pcmcia_request_configuration(link, &link->conf); 209 i = pcmcia_request_configuration(link, &link->conf);
211 if (i != 0) { 210 if (i != 0) {
212 cs_error(link, RequestConfiguration, i);
213 pcmcia_disable_device(link); 211 pcmcia_disable_device(link);
214 break; 212 break;
215 } 213 }
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 23560c897ec3..6d963f9a09ce 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -30,22 +30,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for AVM A1/Fritz!PCMCIA car
30MODULE_AUTHOR("Carsten Paeth"); 30MODULE_AUTHOR("Carsten Paeth");
31MODULE_LICENSE("GPL"); 31MODULE_LICENSE("GPL");
32 32
33/*
34 All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
35 you do not define PCMCIA_DEBUG at all, all the debug code will be
36 left out. If you compile with PCMCIA_DEBUG=0, the debug code will
37 be present but disabled -- but it can then be enabled for specific
38 modules at load time with a 'pc_debug=#' option to insmod.
39*/
40#ifdef PCMCIA_DEBUG
41static int pc_debug = PCMCIA_DEBUG;
42module_param(pc_debug, int, 0);
43#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
44static char *version =
45"avma1_cs.c 1.00 1998/01/23 10:00:00 (Carsten Paeth)";
46#else
47#define DEBUG(n, args...)
48#endif
49 33
50/*====================================================================*/ 34/*====================================================================*/
51 35
@@ -119,7 +103,7 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
119{ 103{
120 local_info_t *local; 104 local_info_t *local;
121 105
122 DEBUG(0, "avma1cs_attach()\n"); 106 dev_dbg(&p_dev->dev, "avma1cs_attach()\n");
123 107
124 /* Allocate space for private device-specific data */ 108 /* Allocate space for private device-specific data */
125 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 109 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
@@ -161,7 +145,7 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
161 145
162static void avma1cs_detach(struct pcmcia_device *link) 146static void avma1cs_detach(struct pcmcia_device *link)
163{ 147{
164 DEBUG(0, "avma1cs_detach(0x%p)\n", link); 148 dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link);
165 avma1cs_release(link); 149 avma1cs_release(link);
166 kfree(link->priv); 150 kfree(link->priv);
167} /* avma1cs_detach */ 151} /* avma1cs_detach */
@@ -203,7 +187,7 @@ static int avma1cs_config(struct pcmcia_device *link)
203 187
204 dev = link->priv; 188 dev = link->priv;
205 189
206 DEBUG(0, "avma1cs_config(0x%p)\n", link); 190 dev_dbg(&link->dev, "avma1cs_config(0x%p)\n", link);
207 191
208 devname[0] = 0; 192 devname[0] = 0;
209 if (link->prod_id[1]) 193 if (link->prod_id[1])
@@ -218,7 +202,6 @@ static int avma1cs_config(struct pcmcia_device *link)
218 */ 202 */
219 i = pcmcia_request_irq(link, &link->irq); 203 i = pcmcia_request_irq(link, &link->irq);
220 if (i != 0) { 204 if (i != 0) {
221 cs_error(link, RequestIRQ, i);
222 /* undo */ 205 /* undo */
223 pcmcia_disable_device(link); 206 pcmcia_disable_device(link);
224 break; 207 break;
@@ -229,7 +212,6 @@ static int avma1cs_config(struct pcmcia_device *link)
229 */ 212 */
230 i = pcmcia_request_configuration(link, &link->conf); 213 i = pcmcia_request_configuration(link, &link->conf);
231 if (i != 0) { 214 if (i != 0) {
232 cs_error(link, RequestConfiguration, i);
233 pcmcia_disable_device(link); 215 pcmcia_disable_device(link);
234 break; 216 break;
235 } 217 }
@@ -281,7 +263,7 @@ static void avma1cs_release(struct pcmcia_device *link)
281{ 263{
282 local_info_t *local = link->priv; 264 local_info_t *local = link->priv;
283 265
284 DEBUG(0, "avma1cs_release(0x%p)\n", link); 266 dev_dbg(&link->dev, "avma1cs_release(0x%p)\n", link);
285 267
286 /* now unregister function with hisax */ 268 /* now unregister function with hisax */
287 HiSax_closecard(local->node.minor); 269 HiSax_closecard(local->node.minor);
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index f4d0fe29bcf8..cdcd2979fcd4 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -57,23 +57,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Elsa PCM cards");
57MODULE_AUTHOR("Klaus Lichtenwalder"); 57MODULE_AUTHOR("Klaus Lichtenwalder");
58MODULE_LICENSE("Dual MPL/GPL"); 58MODULE_LICENSE("Dual MPL/GPL");
59 59
60/*
61 All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
62 you do not define PCMCIA_DEBUG at all, all the debug code will be
63 left out. If you compile with PCMCIA_DEBUG=0, the debug code will
64 be present but disabled -- but it can then be enabled for specific
65 modules at load time with a 'pc_debug=#' option to insmod.
66*/
67
68#ifdef PCMCIA_DEBUG
69static int pc_debug = PCMCIA_DEBUG;
70module_param(pc_debug, int, 0);
71#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
72static char *version =
73"elsa_cs.c $Revision: 1.2.2.4 $ $Date: 2004/01/25 15:07:06 $ (K.Lichtenwalder)";
74#else
75#define DEBUG(n, args...)
76#endif
77 60
78/*====================================================================*/ 61/*====================================================================*/
79 62
@@ -142,7 +125,7 @@ static int elsa_cs_probe(struct pcmcia_device *link)
142{ 125{
143 local_info_t *local; 126 local_info_t *local;
144 127
145 DEBUG(0, "elsa_cs_attach()\n"); 128 dev_dbg(&link->dev, "elsa_cs_attach()\n");
146 129
147 /* Allocate space for private device-specific data */ 130 /* Allocate space for private device-specific data */
148 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 131 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
@@ -188,7 +171,7 @@ static void elsa_cs_detach(struct pcmcia_device *link)
188{ 171{
189 local_info_t *info = link->priv; 172 local_info_t *info = link->priv;
190 173
191 DEBUG(0, "elsa_cs_detach(0x%p)\n", link); 174 dev_dbg(&link->dev, "elsa_cs_detach(0x%p)\n", link);
192 175
193 info->busy = 1; 176 info->busy = 1;
194 elsa_cs_release(link); 177 elsa_cs_release(link);
@@ -231,30 +214,25 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev,
231static int elsa_cs_config(struct pcmcia_device *link) 214static int elsa_cs_config(struct pcmcia_device *link)
232{ 215{
233 local_info_t *dev; 216 local_info_t *dev;
234 int i, last_fn; 217 int i;
235 IsdnCard_t icard; 218 IsdnCard_t icard;
236 219
237 DEBUG(0, "elsa_config(0x%p)\n", link); 220 dev_dbg(&link->dev, "elsa_config(0x%p)\n", link);
238 dev = link->priv; 221 dev = link->priv;
239 222
240 i = pcmcia_loop_config(link, elsa_cs_configcheck, NULL); 223 i = pcmcia_loop_config(link, elsa_cs_configcheck, NULL);
241 if (i != 0) { 224 if (i != 0)
242 last_fn = RequestIO; 225 goto failed;
243 goto cs_failed;
244 }
245 226
246 i = pcmcia_request_irq(link, &link->irq); 227 i = pcmcia_request_irq(link, &link->irq);
247 if (i != 0) { 228 if (i != 0) {
248 link->irq.AssignedIRQ = 0; 229 link->irq.AssignedIRQ = 0;
249 last_fn = RequestIRQ; 230 goto failed;
250 goto cs_failed;
251 } 231 }
252 232
253 i = pcmcia_request_configuration(link, &link->conf); 233 i = pcmcia_request_configuration(link, &link->conf);
254 if (i != 0) { 234 if (i != 0)
255 last_fn = RequestConfiguration; 235 goto failed;
256 goto cs_failed;
257 }
258 236
259 /* At this point, the dev_node_t structure(s) should be 237 /* At this point, the dev_node_t structure(s) should be
260 initialized and arranged in a linked list at link->dev. *//* */ 238 initialized and arranged in a linked list at link->dev. *//* */
@@ -290,8 +268,7 @@ static int elsa_cs_config(struct pcmcia_device *link)
290 ((local_info_t*)link->priv)->cardnr = i; 268 ((local_info_t*)link->priv)->cardnr = i;
291 269
292 return 0; 270 return 0;
293cs_failed: 271failed:
294 cs_error(link, last_fn, i);
295 elsa_cs_release(link); 272 elsa_cs_release(link);
296 return -ENODEV; 273 return -ENODEV;
297} /* elsa_cs_config */ 274} /* elsa_cs_config */
@@ -308,7 +285,7 @@ static void elsa_cs_release(struct pcmcia_device *link)
308{ 285{
309 local_info_t *local = link->priv; 286 local_info_t *local = link->priv;
310 287
311 DEBUG(0, "elsa_cs_release(0x%p)\n", link); 288 dev_dbg(&link->dev, "elsa_cs_release(0x%p)\n", link);
312 289
313 if (local) { 290 if (local) {
314 if (local->cardnr >= 0) { 291 if (local->cardnr >= 0) {
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 9a3c9f5e4fe8..33d7530527c7 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -57,24 +57,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Sedlbauer cards");
57MODULE_AUTHOR("Marcus Niemann"); 57MODULE_AUTHOR("Marcus Niemann");
58MODULE_LICENSE("Dual MPL/GPL"); 58MODULE_LICENSE("Dual MPL/GPL");
59 59
60/*
61 All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
62 you do not define PCMCIA_DEBUG at all, all the debug code will be
63 left out. If you compile with PCMCIA_DEBUG=0, the debug code will
64 be present but disabled -- but it can then be enabled for specific
65 modules at load time with a 'pc_debug=#' option to insmod.
66*/
67
68#ifdef PCMCIA_DEBUG
69static int pc_debug = PCMCIA_DEBUG;
70module_param(pc_debug, int, 0);
71#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
72static char *version =
73"sedlbauer_cs.c 1.1a 2001/01/28 15:04:04 (M.Niemann)";
74#else
75#define DEBUG(n, args...)
76#endif
77
78 60
79/*====================================================================*/ 61/*====================================================================*/
80 62
@@ -151,7 +133,7 @@ static int sedlbauer_probe(struct pcmcia_device *link)
151{ 133{
152 local_info_t *local; 134 local_info_t *local;
153 135
154 DEBUG(0, "sedlbauer_attach()\n"); 136 dev_dbg(&link->dev, "sedlbauer_attach()\n");
155 137
156 /* Allocate space for private device-specific data */ 138 /* Allocate space for private device-specific data */
157 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 139 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
@@ -198,7 +180,7 @@ static int sedlbauer_probe(struct pcmcia_device *link)
198 180
199static void sedlbauer_detach(struct pcmcia_device *link) 181static void sedlbauer_detach(struct pcmcia_device *link)
200{ 182{
201 DEBUG(0, "sedlbauer_detach(0x%p)\n", link); 183 dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link);
202 184
203 ((local_info_t *)link->priv)->stop = 1; 185 ((local_info_t *)link->priv)->stop = 1;
204 sedlbauer_release(link); 186 sedlbauer_release(link);
@@ -214,9 +196,6 @@ static void sedlbauer_detach(struct pcmcia_device *link)
214 device available to the system. 196 device available to the system.
215 197
216======================================================================*/ 198======================================================================*/
217#define CS_CHECK(fn, ret) \
218do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
219
220static int sedlbauer_config_check(struct pcmcia_device *p_dev, 199static int sedlbauer_config_check(struct pcmcia_device *p_dev,
221 cistpl_cftable_entry_t *cfg, 200 cistpl_cftable_entry_t *cfg,
222 cistpl_cftable_entry_t *dflt, 201 cistpl_cftable_entry_t *dflt,
@@ -309,10 +288,10 @@ static int sedlbauer_config(struct pcmcia_device *link)
309{ 288{
310 local_info_t *dev = link->priv; 289 local_info_t *dev = link->priv;
311 win_req_t *req; 290 win_req_t *req;
312 int last_fn, last_ret; 291 int ret;
313 IsdnCard_t icard; 292 IsdnCard_t icard;
314 293
315 DEBUG(0, "sedlbauer_config(0x%p)\n", link); 294 dev_dbg(&link->dev, "sedlbauer_config(0x%p)\n", link);
316 295
317 req = kzalloc(sizeof(win_req_t), GFP_KERNEL); 296 req = kzalloc(sizeof(win_req_t), GFP_KERNEL);
318 if (!req) 297 if (!req)
@@ -330,8 +309,8 @@ static int sedlbauer_config(struct pcmcia_device *link)
330 these things without consulting the CIS, and most client drivers 309 these things without consulting the CIS, and most client drivers
331 will only use the CIS to fill in implementation-defined details. 310 will only use the CIS to fill in implementation-defined details.
332 */ 311 */
333 last_ret = pcmcia_loop_config(link, sedlbauer_config_check, req); 312 ret = pcmcia_loop_config(link, sedlbauer_config_check, req);
334 if (last_ret) 313 if (ret)
335 goto failed; 314 goto failed;
336 315
337 /* 316 /*
@@ -339,15 +318,20 @@ static int sedlbauer_config(struct pcmcia_device *link)
339 handler to the interrupt, unless the 'Handler' member of the 318 handler to the interrupt, unless the 'Handler' member of the
340 irq structure is initialized. 319 irq structure is initialized.
341 */ 320 */
342 if (link->conf.Attributes & CONF_ENABLE_IRQ) 321 if (link->conf.Attributes & CONF_ENABLE_IRQ) {
343 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); 322 ret = pcmcia_request_irq(link, &link->irq);
323 if (ret)
324 goto failed;
325 }
344 326
345 /* 327 /*
346 This actually configures the PCMCIA socket -- setting up 328 This actually configures the PCMCIA socket -- setting up
347 the I/O windows and the interrupt mapping, and putting the 329 the I/O windows and the interrupt mapping, and putting the
348 card and host interface into "Memory and IO" mode. 330 card and host interface into "Memory and IO" mode.
349 */ 331 */
350 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); 332 ret = pcmcia_request_configuration(link, &link->conf);
333 if (ret)
334 goto failed;
351 335
352 /* 336 /*
353 At this point, the dev_node_t structure(s) need to be 337 At this point, the dev_node_t structure(s) need to be
@@ -380,19 +364,18 @@ static int sedlbauer_config(struct pcmcia_device *link)
380 icard.protocol = protocol; 364 icard.protocol = protocol;
381 icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; 365 icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA;
382 366
383 last_ret = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->stop), &icard); 367 ret = hisax_init_pcmcia(link,
384 if (last_ret < 0) { 368 &(((local_info_t *)link->priv)->stop), &icard);
385 printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n", 369 if (ret < 0) {
386 last_ret, link->io.BasePort1); 370 printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n",
371 ret, link->io.BasePort1);
387 sedlbauer_release(link); 372 sedlbauer_release(link);
388 return -ENODEV; 373 return -ENODEV;
389 } else 374 } else
390 ((local_info_t*)link->priv)->cardnr = last_ret; 375 ((local_info_t *)link->priv)->cardnr = ret;
391 376
392 return 0; 377 return 0;
393 378
394cs_failed:
395 cs_error(link, last_fn, last_ret);
396failed: 379failed:
397 sedlbauer_release(link); 380 sedlbauer_release(link);
398 return -ENODEV; 381 return -ENODEV;
@@ -410,7 +393,7 @@ failed:
410static void sedlbauer_release(struct pcmcia_device *link) 393static void sedlbauer_release(struct pcmcia_device *link)
411{ 394{
412 local_info_t *local = link->priv; 395 local_info_t *local = link->priv;
413 DEBUG(0, "sedlbauer_release(0x%p)\n", link); 396 dev_dbg(&link->dev, "sedlbauer_release(0x%p)\n", link);
414 397
415 if (local) { 398 if (local) {
416 if (local->cardnr >= 0) { 399 if (local->cardnr >= 0) {
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 623d111544d4..7b11c15b3a97 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -38,23 +38,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Teles PCMCIA cards");
38MODULE_AUTHOR("Christof Petig, christof.petig@wtal.de, Karsten Keil, kkeil@suse.de"); 38MODULE_AUTHOR("Christof Petig, christof.petig@wtal.de, Karsten Keil, kkeil@suse.de");
39MODULE_LICENSE("GPL"); 39MODULE_LICENSE("GPL");
40 40
41/*
42 All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
43 you do not define PCMCIA_DEBUG at all, all the debug code will be
44 left out. If you compile with PCMCIA_DEBUG=0, the debug code will
45 be present but disabled -- but it can then be enabled for specific
46 modules at load time with a 'pc_debug=#' option to insmod.
47*/
48
49#ifdef PCMCIA_DEBUG
50static int pc_debug = PCMCIA_DEBUG;
51module_param(pc_debug, int, 0);
52#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
53static char *version =
54"teles_cs.c 2.10 2002/07/30 22:23:34 kkeil";
55#else
56#define DEBUG(n, args...)
57#endif
58 41
59/*====================================================================*/ 42/*====================================================================*/
60 43
@@ -133,7 +116,7 @@ static int teles_probe(struct pcmcia_device *link)
133{ 116{
134 local_info_t *local; 117 local_info_t *local;
135 118
136 DEBUG(0, "teles_attach()\n"); 119 dev_dbg(&link->dev, "teles_attach()\n");
137 120
138 /* Allocate space for private device-specific data */ 121 /* Allocate space for private device-specific data */
139 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 122 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
@@ -178,7 +161,7 @@ static void teles_detach(struct pcmcia_device *link)
178{ 161{
179 local_info_t *info = link->priv; 162 local_info_t *info = link->priv;
180 163
181 DEBUG(0, "teles_detach(0x%p)\n", link); 164 dev_dbg(&link->dev, "teles_detach(0x%p)\n", link);
182 165
183 info->busy = 1; 166 info->busy = 1;
184 teles_cs_release(link); 167 teles_cs_release(link);
@@ -221,30 +204,25 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev,
221static int teles_cs_config(struct pcmcia_device *link) 204static int teles_cs_config(struct pcmcia_device *link)
222{ 205{
223 local_info_t *dev; 206 local_info_t *dev;
224 int i, last_fn; 207 int i;
225 IsdnCard_t icard; 208 IsdnCard_t icard;
226 209
227 DEBUG(0, "teles_config(0x%p)\n", link); 210 dev_dbg(&link->dev, "teles_config(0x%p)\n", link);
228 dev = link->priv; 211 dev = link->priv;
229 212
230 i = pcmcia_loop_config(link, teles_cs_configcheck, NULL); 213 i = pcmcia_loop_config(link, teles_cs_configcheck, NULL);
231 if (i != 0) { 214 if (i != 0)
232 last_fn = RequestIO;
233 goto cs_failed; 215 goto cs_failed;
234 }
235 216
236 i = pcmcia_request_irq(link, &link->irq); 217 i = pcmcia_request_irq(link, &link->irq);
237 if (i != 0) { 218 if (i != 0) {
238 link->irq.AssignedIRQ = 0; 219 link->irq.AssignedIRQ = 0;
239 last_fn = RequestIRQ;
240 goto cs_failed; 220 goto cs_failed;
241 } 221 }
242 222
243 i = pcmcia_request_configuration(link, &link->conf); 223 i = pcmcia_request_configuration(link, &link->conf);
244 if (i != 0) { 224 if (i != 0)
245 last_fn = RequestConfiguration;
246 goto cs_failed; 225 goto cs_failed;
247 }
248 226
249 /* At this point, the dev_node_t structure(s) should be 227 /* At this point, the dev_node_t structure(s) should be
250 initialized and arranged in a linked list at link->dev. *//* */ 228 initialized and arranged in a linked list at link->dev. *//* */
@@ -283,7 +261,6 @@ static int teles_cs_config(struct pcmcia_device *link)
283 return 0; 261 return 0;
284 262
285cs_failed: 263cs_failed:
286 cs_error(link, last_fn, i);
287 teles_cs_release(link); 264 teles_cs_release(link);
288 return -ENODEV; 265 return -ENODEV;
289} /* teles_cs_config */ 266} /* teles_cs_config */
@@ -300,7 +277,7 @@ static void teles_cs_release(struct pcmcia_device *link)
300{ 277{
301 local_info_t *local = link->priv; 278 local_info_t *local = link->priv;
302 279
303 DEBUG(0, "teles_cs_release(0x%p)\n", link); 280 dev_dbg(&link->dev, "teles_cs_release(0x%p)\n", link);
304 281
305 if (local) { 282 if (local) {
306 if (local->cardnr >= 0) { 283 if (local->cardnr >= 0) {