aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:26:06 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:26:06 +0200
commit15b99ac1729503db9e6dc642a50b9b6cb3bf51f9 (patch)
treecfb8897487beba502aac2b28bc35066a87e34299 /drivers/serial
parentfba395eee7d3f342ca739c20f5b3ee635d0420a0 (diff)
downloadkernel_samsung_crespo-15b99ac1729503db9e6dc642a50b9b6cb3bf51f9.zip
kernel_samsung_crespo-15b99ac1729503db9e6dc642a50b9b6cb3bf51f9.tar.gz
kernel_samsung_crespo-15b99ac1729503db9e6dc642a50b9b6cb3bf51f9.tar.bz2
[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/serial')
-rw-r--r--drivers/serial/serial_cs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 1fe8caf..e787509 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -113,7 +113,7 @@ struct serial_cfg_mem {
};
-static void serial_config(struct pcmcia_device * link);
+static int serial_config(struct pcmcia_device * link);
/*======================================================================
@@ -211,9 +211,7 @@ static int serial_probe(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO;
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- serial_config(link);
-
- return 0;
+ return serial_config(link);
}
/*======================================================================
@@ -553,7 +551,7 @@ free_cfg_mem:
======================================================================*/
-void serial_config(struct pcmcia_device * link)
+static int serial_config(struct pcmcia_device * link)
{
struct serial_info *info = link->priv;
struct serial_cfg_mem *cfg_mem;
@@ -652,7 +650,7 @@ void serial_config(struct pcmcia_device * link)
link->dev_node = &info->node[0];
link->state &= ~DEV_CONFIG_PENDING;
kfree(cfg_mem);
- return;
+ return 0;
cs_failed:
cs_error(link, last_fn, last_ret);
@@ -660,6 +658,7 @@ void serial_config(struct pcmcia_device * link)
serial_remove(link);
link->state &= ~DEV_CONFIG_PENDING;
kfree(cfg_mem);
+ return -ENODEV;
}
static struct pcmcia_device_id serial_ids[] = {