diff options
Diffstat (limited to 'drivers/scsi/pcmcia/qlogic_stub.c')
-rw-r--r-- | drivers/scsi/pcmcia/qlogic_stub.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index a2a1c4b318e6..61c2eb03a9b5 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
@@ -99,7 +99,7 @@ typedef struct scsi_info_t { | |||
99 | 99 | ||
100 | static void qlogic_release(struct pcmcia_device *link); | 100 | static void qlogic_release(struct pcmcia_device *link); |
101 | static void qlogic_detach(struct pcmcia_device *p_dev); | 101 | static void qlogic_detach(struct pcmcia_device *p_dev); |
102 | static void qlogic_config(struct pcmcia_device * link); | 102 | static int qlogic_config(struct pcmcia_device * link); |
103 | 103 | ||
104 | static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host, | 104 | static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host, |
105 | struct pcmcia_device *link, int qbase, int qlirq) | 105 | struct pcmcia_device *link, int qbase, int qlirq) |
@@ -156,7 +156,7 @@ free_scsi_host: | |||
156 | err: | 156 | err: |
157 | return NULL; | 157 | return NULL; |
158 | } | 158 | } |
159 | static int qlogic_attach(struct pcmcia_device *link) | 159 | static int qlogic_probe(struct pcmcia_device *link) |
160 | { | 160 | { |
161 | scsi_info_t *info; | 161 | scsi_info_t *info; |
162 | 162 | ||
@@ -179,9 +179,7 @@ static int qlogic_attach(struct pcmcia_device *link) | |||
179 | link->conf.Present = PRESENT_OPTION; | 179 | link->conf.Present = PRESENT_OPTION; |
180 | 180 | ||
181 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 181 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
182 | qlogic_config(link); | 182 | return qlogic_config(link); |
183 | |||
184 | return 0; | ||
185 | } /* qlogic_attach */ | 183 | } /* qlogic_attach */ |
186 | 184 | ||
187 | /*====================================================================*/ | 185 | /*====================================================================*/ |
@@ -202,7 +200,7 @@ static void qlogic_detach(struct pcmcia_device *link) | |||
202 | #define CS_CHECK(fn, ret) \ | 200 | #define CS_CHECK(fn, ret) \ |
203 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | 201 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) |
204 | 202 | ||
205 | static void qlogic_config(struct pcmcia_device * link) | 203 | static int qlogic_config(struct pcmcia_device * link) |
206 | { | 204 | { |
207 | scsi_info_t *info = link->priv; | 205 | scsi_info_t *info = link->priv; |
208 | tuple_t tuple; | 206 | tuple_t tuple; |
@@ -267,21 +265,20 @@ static void qlogic_config(struct pcmcia_device * link) | |||
267 | 265 | ||
268 | if (!host) { | 266 | if (!host) { |
269 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); | 267 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); |
270 | goto out; | 268 | goto cs_failed; |
271 | } | 269 | } |
272 | 270 | ||
273 | sprintf(info->node.dev_name, "scsi%d", host->host_no); | 271 | sprintf(info->node.dev_name, "scsi%d", host->host_no); |
274 | link->dev_node = &info->node; | 272 | link->dev_node = &info->node; |
275 | info->host = host; | 273 | info->host = host; |
276 | 274 | ||
277 | out: | ||
278 | link->state &= ~DEV_CONFIG_PENDING; | 275 | link->state &= ~DEV_CONFIG_PENDING; |
279 | return; | 276 | return 0; |
280 | 277 | ||
281 | cs_failed: | 278 | cs_failed: |
282 | cs_error(link, last_fn, last_ret); | 279 | cs_error(link, last_fn, last_ret); |
283 | pcmcia_disable_device(link); | 280 | pcmcia_disable_device(link); |
284 | return; | 281 | return -ENODEV; |
285 | 282 | ||
286 | } /* qlogic_config */ | 283 | } /* qlogic_config */ |
287 | 284 | ||
@@ -350,7 +347,7 @@ static struct pcmcia_driver qlogic_cs_driver = { | |||
350 | .drv = { | 347 | .drv = { |
351 | .name = "qlogic_cs", | 348 | .name = "qlogic_cs", |
352 | }, | 349 | }, |
353 | .probe = qlogic_attach, | 350 | .probe = qlogic_probe, |
354 | .remove = qlogic_detach, | 351 | .remove = qlogic_detach, |
355 | .id_table = qlogic_ids, | 352 | .id_table = qlogic_ids, |
356 | .resume = qlogic_resume, | 353 | .resume = qlogic_resume, |