diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 06:15:11 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:57 -0400 |
commit | 926c5402c287f6d911f7d00f936f09ea00880527 (patch) | |
tree | 82885b3dd11e486a47a1b84fe36ef214269f0f96 /drivers/pcmcia/pcmcia_resource.c | |
parent | 69ba44331e81e4a15b504175ec70b7b4b4e5a8b9 (diff) |
pcmcia: deprecate CS_BAD_ARGS
CS_BAD_ARGS mean a badly written driver or invalid userspace ioctl access,
so translate that to -EINVAL.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index fee57139a96f..de13c424101c 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -189,7 +189,7 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, | |||
189 | pcmcia_write_cis_mem(s, 1, addr, 1, &val); | 189 | pcmcia_write_cis_mem(s, 1, addr, 1, &val); |
190 | break; | 190 | break; |
191 | default: | 191 | default: |
192 | return CS_BAD_ARGS; | 192 | return -EINVAL; |
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | return 0; | 195 | return 0; |
@@ -401,7 +401,7 @@ static int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req) | |||
401 | (c->io.NumPorts1 != req->NumPorts1) || | 401 | (c->io.NumPorts1 != req->NumPorts1) || |
402 | (c->io.BasePort2 != req->BasePort2) || | 402 | (c->io.BasePort2 != req->BasePort2) || |
403 | (c->io.NumPorts2 != req->NumPorts2)) | 403 | (c->io.NumPorts2 != req->NumPorts2)) |
404 | return CS_BAD_ARGS; | 404 | return -EINVAL; |
405 | 405 | ||
406 | c->state &= ~CONFIG_IO_REQ; | 406 | c->state &= ~CONFIG_IO_REQ; |
407 | 407 | ||
@@ -855,8 +855,10 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h | |||
855 | if (req->Attributes & WIN_USE_WAIT) | 855 | if (req->Attributes & WIN_USE_WAIT) |
856 | win->ctl.flags |= MAP_USE_WAIT; | 856 | win->ctl.flags |= MAP_USE_WAIT; |
857 | win->ctl.card_start = 0; | 857 | win->ctl.card_start = 0; |
858 | if (s->ops->set_mem_map(s, &win->ctl) != 0) | 858 | if (s->ops->set_mem_map(s, &win->ctl) != 0) { |
859 | return CS_BAD_ARGS; | 859 | ds_dbg(s, 0, "failed to set memory mapping\n"); |
860 | return -EIO; | ||
861 | } | ||
860 | s->state |= SOCKET_WIN_REQ(w); | 862 | s->state |= SOCKET_WIN_REQ(w); |
861 | 863 | ||
862 | /* Return window handle */ | 864 | /* Return window handle */ |