aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/parport_cs.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index 6dcaf44c120a..e4be826c48ba 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -88,7 +88,7 @@ typedef struct parport_info_t {
88} parport_info_t; 88} parport_info_t;
89 89
90static void parport_detach(struct pcmcia_device *p_dev); 90static void parport_detach(struct pcmcia_device *p_dev);
91static void parport_config(struct pcmcia_device *link); 91static int parport_config(struct pcmcia_device *link);
92static void parport_cs_release(struct pcmcia_device *); 92static void parport_cs_release(struct pcmcia_device *);
93 93
94/*====================================================================== 94/*======================================================================
@@ -99,7 +99,7 @@ static void parport_cs_release(struct pcmcia_device *);
99 99
100======================================================================*/ 100======================================================================*/
101 101
102static int parport_attach(struct pcmcia_device *link) 102static int parport_probe(struct pcmcia_device *link)
103{ 103{
104 parport_info_t *info; 104 parport_info_t *info;
105 105
@@ -120,9 +120,7 @@ static int parport_attach(struct pcmcia_device *link)
120 link->conf.IntType = INT_MEMORY_AND_IO; 120 link->conf.IntType = INT_MEMORY_AND_IO;
121 121
122 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 122 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
123 parport_config(link); 123 return parport_config(link);
124
125 return 0;
126} /* parport_attach */ 124} /* parport_attach */
127 125
128/*====================================================================== 126/*======================================================================
@@ -155,7 +153,7 @@ static void parport_detach(struct pcmcia_device *link)
155#define CS_CHECK(fn, ret) \ 153#define CS_CHECK(fn, ret) \
156do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 154do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
157 155
158void parport_config(struct pcmcia_device *link) 156static int parport_config(struct pcmcia_device *link)
159{ 157{
160 parport_info_t *info = link->priv; 158 parport_info_t *info = link->priv;
161 tuple_t tuple; 159 tuple_t tuple;
@@ -236,14 +234,14 @@ void parport_config(struct pcmcia_device *link)
236 link->dev_node = &info->node; 234 link->dev_node = &info->node;
237 235
238 link->state &= ~DEV_CONFIG_PENDING; 236 link->state &= ~DEV_CONFIG_PENDING;
239 return; 237 return 0;
240 238
241cs_failed: 239cs_failed:
242 cs_error(link, last_fn, last_ret); 240 cs_error(link, last_fn, last_ret);
243failed: 241failed:
244 parport_cs_release(link); 242 parport_cs_release(link);
245 link->state &= ~DEV_CONFIG_PENDING; 243 link->state &= ~DEV_CONFIG_PENDING;
246 244 return -ENODEV;
247} /* parport_config */ 245} /* parport_config */
248 246
249/*====================================================================== 247/*======================================================================
@@ -282,7 +280,7 @@ static struct pcmcia_driver parport_cs_driver = {
282 .drv = { 280 .drv = {
283 .name = "parport_cs", 281 .name = "parport_cs",
284 }, 282 },
285 .probe = parport_attach, 283 .probe = parport_probe,
286 .remove = parport_detach, 284 .remove = parport_detach,
287 .id_table = parport_ids, 285 .id_table = parport_ids,
288}; 286};