aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/teles_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
commit15b99ac1729503db9e6dc642a50b9b6cb3bf51f9 (patch)
treecfb8897487beba502aac2b28bc35066a87e34299 /drivers/isdn/hisax/teles_cs.c
parentfba395eee7d3f342ca739c20f5b3ee635d0420a0 (diff)
[PATCH] pcmcia: add return value to _config() functions
Most of the driver initialization isn't done in the .probe function, but in the internal _config() functions. Make them return a value, so that .probe can properly report whether the probing of the device succeeded or not. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/isdn/hisax/teles_cs.c')
-rw-r--r--drivers/isdn/hisax/teles_cs.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 698e9ec95f0b..7b66038096f3 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -75,7 +75,7 @@ module_param(protocol, int, 0);
75 handler. 75 handler.
76*/ 76*/
77 77
78static void teles_cs_config(struct pcmcia_device *link); 78static int teles_cs_config(struct pcmcia_device *link);
79static void teles_cs_release(struct pcmcia_device *link); 79static void teles_cs_release(struct pcmcia_device *link);
80 80
81/* 81/*
@@ -130,7 +130,7 @@ typedef struct local_info_t {
130 130
131======================================================================*/ 131======================================================================*/
132 132
133static int teles_attach(struct pcmcia_device *link) 133static int teles_probe(struct pcmcia_device *link)
134{ 134{
135 local_info_t *local; 135 local_info_t *local;
136 136
@@ -165,9 +165,7 @@ static int teles_attach(struct pcmcia_device *link)
165 link->conf.IntType = INT_MEMORY_AND_IO; 165 link->conf.IntType = INT_MEMORY_AND_IO;
166 166
167 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 167 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
168 teles_cs_config(link); 168 return teles_cs_config(link);
169
170 return 0;
171} /* teles_attach */ 169} /* teles_attach */
172 170
173/*====================================================================== 171/*======================================================================
@@ -225,7 +223,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple,
225 return get_tuple(handle, tuple, parse); 223 return get_tuple(handle, tuple, parse);
226} 224}
227 225
228static void teles_cs_config(struct pcmcia_device *link) 226static int teles_cs_config(struct pcmcia_device *link)
229{ 227{
230 tuple_t tuple; 228 tuple_t tuple;
231 cisparse_t parse; 229 cisparse_t parse;
@@ -333,13 +331,16 @@ static void teles_cs_config(struct pcmcia_device *link)
333 printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n", 331 printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n",
334 i, link->io.BasePort1); 332 i, link->io.BasePort1);
335 teles_cs_release(link); 333 teles_cs_release(link);
336 } else 334 return -ENODEV;
337 ((local_info_t*)link->priv)->cardnr = i; 335 }
336
337 ((local_info_t*)link->priv)->cardnr = i;
338 return 0;
338 339
339 return;
340cs_failed: 340cs_failed:
341 cs_error(link, last_fn, i); 341 cs_error(link, last_fn, i);
342 teles_cs_release(link); 342 teles_cs_release(link);
343 return -ENODEV;
343} /* teles_cs_config */ 344} /* teles_cs_config */
344 345
345/*====================================================================== 346/*======================================================================
@@ -396,7 +397,7 @@ static struct pcmcia_driver teles_cs_driver = {
396 .drv = { 397 .drv = {
397 .name = "teles_cs", 398 .name = "teles_cs",
398 }, 399 },
399 .probe = teles_attach, 400 .probe = teles_probe,
400 .remove = teles_detach, 401 .remove = teles_detach,
401 .id_table = teles_ids, 402 .id_table = teles_ids,
402 .suspend = teles_suspend, 403 .suspend = teles_suspend,