summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btuart_cs.c
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/bluetooth/btuart_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/bluetooth/btuart_cs.c')
-rw-r--r--drivers/bluetooth/btuart_cs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 59483906136..658a1373699 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -84,7 +84,7 @@ typedef struct btuart_info_t {
} btuart_info_t;
-static void btuart_config(struct pcmcia_device *link);
+static int btuart_config(struct pcmcia_device *link);
static void btuart_release(struct pcmcia_device *link);
static void btuart_detach(struct pcmcia_device *p_dev);
@@ -576,7 +576,7 @@ static int btuart_close(btuart_info_t *info)
return 0;
}
-static int btuart_attach(struct pcmcia_device *link)
+static int btuart_probe(struct pcmcia_device *link)
{
btuart_info_t *info;
@@ -600,9 +600,7 @@ static int btuart_attach(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO;
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- btuart_config(link);
-
- return 0;
+ return btuart_config(link);
}
@@ -641,7 +639,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *
return get_tuple(handle, tuple, parse);
}
-static void btuart_config(struct pcmcia_device *link)
+static int btuart_config(struct pcmcia_device *link)
{
static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
btuart_info_t *info = link->priv;
@@ -741,13 +739,14 @@ found_port:
link->dev_node = &info->node;
link->state &= ~DEV_CONFIG_PENDING;
- return;
+ return 0;
cs_failed:
cs_error(link, last_fn, last_ret);
failed:
btuart_release(link);
+ return -ENODEV;
}
@@ -772,7 +771,7 @@ static struct pcmcia_driver btuart_driver = {
.drv = {
.name = "btuart_cs",
},
- .probe = btuart_attach,
+ .probe = btuart_probe,
.remove = btuart_detach,
.id_table = btuart_ids,
};