diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/legacy/ide-cs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 58690c1ff6ba..56c8e828c6e6 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -88,7 +88,7 @@ typedef struct ide_info_t { | |||
88 | } ide_info_t; | 88 | } ide_info_t; |
89 | 89 | ||
90 | static void ide_release(struct pcmcia_device *); | 90 | static void ide_release(struct pcmcia_device *); |
91 | static void ide_config(struct pcmcia_device *); | 91 | static int ide_config(struct pcmcia_device *); |
92 | 92 | ||
93 | static void ide_detach(struct pcmcia_device *p_dev); | 93 | static void ide_detach(struct pcmcia_device *p_dev); |
94 | 94 | ||
@@ -103,7 +103,7 @@ static void ide_detach(struct pcmcia_device *p_dev); | |||
103 | 103 | ||
104 | ======================================================================*/ | 104 | ======================================================================*/ |
105 | 105 | ||
106 | static int ide_attach(struct pcmcia_device *link) | 106 | static int ide_probe(struct pcmcia_device *link) |
107 | { | 107 | { |
108 | ide_info_t *info; | 108 | ide_info_t *info; |
109 | 109 | ||
@@ -126,9 +126,7 @@ static int ide_attach(struct pcmcia_device *link) | |||
126 | link->conf.IntType = INT_MEMORY_AND_IO; | 126 | link->conf.IntType = INT_MEMORY_AND_IO; |
127 | 127 | ||
128 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 128 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
129 | ide_config(link); | 129 | return ide_config(link); |
130 | |||
131 | return 0; | ||
132 | } /* ide_attach */ | 130 | } /* ide_attach */ |
133 | 131 | ||
134 | /*====================================================================== | 132 | /*====================================================================== |
@@ -172,7 +170,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq | |||
172 | #define CS_CHECK(fn, ret) \ | 170 | #define CS_CHECK(fn, ret) \ |
173 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | 171 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) |
174 | 172 | ||
175 | static void ide_config(struct pcmcia_device *link) | 173 | static int ide_config(struct pcmcia_device *link) |
176 | { | 174 | { |
177 | ide_info_t *info = link->priv; | 175 | ide_info_t *info = link->priv; |
178 | tuple_t tuple; | 176 | tuple_t tuple; |
@@ -327,7 +325,7 @@ static void ide_config(struct pcmcia_device *link) | |||
327 | 325 | ||
328 | link->state &= ~DEV_CONFIG_PENDING; | 326 | link->state &= ~DEV_CONFIG_PENDING; |
329 | kfree(stk); | 327 | kfree(stk); |
330 | return; | 328 | return 0; |
331 | 329 | ||
332 | err_mem: | 330 | err_mem: |
333 | printk(KERN_NOTICE "ide-cs: ide_config failed memory allocation\n"); | 331 | printk(KERN_NOTICE "ide-cs: ide_config failed memory allocation\n"); |
@@ -339,6 +337,7 @@ failed: | |||
339 | kfree(stk); | 337 | kfree(stk); |
340 | ide_release(link); | 338 | ide_release(link); |
341 | link->state &= ~DEV_CONFIG_PENDING; | 339 | link->state &= ~DEV_CONFIG_PENDING; |
340 | return -ENODEV; | ||
342 | } /* ide_config */ | 341 | } /* ide_config */ |
343 | 342 | ||
344 | /*====================================================================== | 343 | /*====================================================================== |
@@ -424,7 +423,7 @@ static struct pcmcia_driver ide_cs_driver = { | |||
424 | .drv = { | 423 | .drv = { |
425 | .name = "ide-cs", | 424 | .name = "ide-cs", |
426 | }, | 425 | }, |
427 | .probe = ide_attach, | 426 | .probe = ide_probe, |
428 | .remove = ide_detach, | 427 | .remove = ide_detach, |
429 | .id_table = ide_ids, | 428 | .id_table = ide_ids, |
430 | }; | 429 | }; |