aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/telephony
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/telephony')
-rw-r--r--drivers/telephony/ixj_pcmcia.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c
index bad68187f215..a27df6101dc6 100644
--- a/drivers/telephony/ixj_pcmcia.c
+++ b/drivers/telephony/ixj_pcmcia.c
@@ -35,10 +35,10 @@ typedef struct ixj_info_t {
35} ixj_info_t; 35} ixj_info_t;
36 36
37static void ixj_detach(struct pcmcia_device *p_dev); 37static void ixj_detach(struct pcmcia_device *p_dev);
38static void ixj_config(struct pcmcia_device * link); 38static int ixj_config(struct pcmcia_device * link);
39static void ixj_cs_release(struct pcmcia_device * link); 39static void ixj_cs_release(struct pcmcia_device * link);
40 40
41static int ixj_attach(struct pcmcia_device *p_dev) 41static int ixj_probe(struct pcmcia_device *p_dev)
42{ 42{
43 DEBUG(0, "ixj_attach()\n"); 43 DEBUG(0, "ixj_attach()\n");
44 /* Create new ixj device */ 44 /* Create new ixj device */
@@ -53,9 +53,7 @@ static int ixj_attach(struct pcmcia_device *p_dev)
53 memset(p_dev->priv, 0, sizeof(struct ixj_info_t)); 53 memset(p_dev->priv, 0, sizeof(struct ixj_info_t));
54 54
55 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 55 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
56 ixj_config(p_dev); 56 return ixj_config(p_dev);
57
58 return 0;
59} 57}
60 58
61static void ixj_detach(struct pcmcia_device *link) 59static void ixj_detach(struct pcmcia_device *link)
@@ -133,7 +131,7 @@ static void ixj_get_serial(struct pcmcia_device * link, IXJ * j)
133 return; 131 return;
134} 132}
135 133
136static void ixj_config(struct pcmcia_device * link) 134static int ixj_config(struct pcmcia_device * link)
137{ 135{
138 IXJ *j; 136 IXJ *j;
139 ixj_info_t *info; 137 ixj_info_t *info;
@@ -198,10 +196,11 @@ static void ixj_config(struct pcmcia_device * link)
198 link->dev_node = &info->node; 196 link->dev_node = &info->node;
199 ixj_get_serial(link, j); 197 ixj_get_serial(link, j);
200 link->state &= ~DEV_CONFIG_PENDING; 198 link->state &= ~DEV_CONFIG_PENDING;
201 return; 199 return 0;
202 cs_failed: 200 cs_failed:
203 cs_error(link, last_fn, last_ret); 201 cs_error(link, last_fn, last_ret);
204 ixj_cs_release(link); 202 ixj_cs_release(link);
203 return -ENODEV;
205} 204}
206 205
207static void ixj_cs_release(struct pcmcia_device *link) 206static void ixj_cs_release(struct pcmcia_device *link)
@@ -223,7 +222,7 @@ static struct pcmcia_driver ixj_driver = {
223 .drv = { 222 .drv = {
224 .name = "ixj_cs", 223 .name = "ixj_cs",
225 }, 224 },
226 .probe = ixj_attach, 225 .probe = ixj_probe,
227 .remove = ixj_detach, 226 .remove = ixj_detach,
228 .id_table = ixj_ids, 227 .id_table = ixj_ids,
229}; 228};