diff options
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 3e013854ec2d..55a1238b1c57 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -238,7 +238,7 @@ EXPORT_SYMBOL(pcmcia_get_window); | |||
238 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req) | 238 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req) |
239 | { | 239 | { |
240 | if ((win == NULL) || (win->magic != WINDOW_MAGIC)) | 240 | if ((win == NULL) || (win->magic != WINDOW_MAGIC)) |
241 | return CS_BAD_HANDLE; | 241 | return -EINVAL; |
242 | req->Page = 0; | 242 | req->Page = 0; |
243 | req->CardOffset = win->ctl.card_start; | 243 | req->CardOffset = win->ctl.card_start; |
244 | return 0; | 244 | return 0; |
@@ -250,7 +250,7 @@ int pcmcia_map_mem_page(window_handle_t win, memreq_t *req) | |||
250 | { | 250 | { |
251 | struct pcmcia_socket *s; | 251 | struct pcmcia_socket *s; |
252 | if ((win == NULL) || (win->magic != WINDOW_MAGIC)) | 252 | if ((win == NULL) || (win->magic != WINDOW_MAGIC)) |
253 | return CS_BAD_HANDLE; | 253 | return -EINVAL; |
254 | if (req->Page != 0) | 254 | if (req->Page != 0) |
255 | return CS_BAD_PAGE; | 255 | return CS_BAD_PAGE; |
256 | s = win->sock; | 256 | s = win->sock; |
@@ -389,7 +389,7 @@ static int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req) | |||
389 | config_t *c = p_dev->function_config; | 389 | config_t *c = p_dev->function_config; |
390 | 390 | ||
391 | if (!p_dev->_io ) | 391 | if (!p_dev->_io ) |
392 | return CS_BAD_HANDLE; | 392 | return -EINVAL; |
393 | 393 | ||
394 | p_dev->_io = 0; | 394 | p_dev->_io = 0; |
395 | 395 | ||
@@ -415,7 +415,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
415 | config_t *c= p_dev->function_config; | 415 | config_t *c= p_dev->function_config; |
416 | 416 | ||
417 | if (!p_dev->_irq) | 417 | if (!p_dev->_irq) |
418 | return CS_BAD_HANDLE; | 418 | return -EINVAL; |
419 | p_dev->_irq = 0; | 419 | p_dev->_irq = 0; |
420 | 420 | ||
421 | if (c->state & CONFIG_LOCKED) | 421 | if (c->state & CONFIG_LOCKED) |
@@ -446,10 +446,10 @@ int pcmcia_release_window(window_handle_t win) | |||
446 | struct pcmcia_socket *s; | 446 | struct pcmcia_socket *s; |
447 | 447 | ||
448 | if ((win == NULL) || (win->magic != WINDOW_MAGIC)) | 448 | if ((win == NULL) || (win->magic != WINDOW_MAGIC)) |
449 | return CS_BAD_HANDLE; | 449 | return -EINVAL; |
450 | s = win->sock; | 450 | s = win->sock; |
451 | if (!(win->handle->_win & CLIENT_WIN_REQ(win->index))) | 451 | if (!(win->handle->_win & CLIENT_WIN_REQ(win->index))) |
452 | return CS_BAD_HANDLE; | 452 | return -EINVAL; |
453 | 453 | ||
454 | /* Shut down memory window */ | 454 | /* Shut down memory window */ |
455 | win->ctl.flags &= ~MAP_ACTIVE; | 455 | win->ctl.flags &= ~MAP_ACTIVE; |