diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 12:15:11 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-23 02:29:57 +0200 |
commit | 926c5402c287f6d911f7d00f936f09ea00880527 (patch) | |
tree | 82885b3dd11e486a47a1b84fe36ef214269f0f96 /drivers/pcmcia/pcmcia_ioctl.c | |
parent | 69ba44331e81e4a15b504175ec70b7b4b4e5a8b9 (diff) | |
download | linux-926c5402c287f6d911f7d00f936f09ea00880527.tar.bz2 |
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_ioctl.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 99563134ac0f..f2352c227570 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -836,7 +836,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, case DS_GET_CONFIGURATION_INFO: if (buf->config.Function && (buf->config.Function >= s->functions)) - ret = CS_BAD_ARGS; + ret = -EINVAL; else { struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function); ret = pccard_get_configuration_info(s, p_dev, &buf->config); @@ -867,7 +867,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, case DS_GET_STATUS: if (buf->status.Function && (buf->status.Function >= s->functions)) - ret = CS_BAD_ARGS; + ret = -EINVAL; else { struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function); ret = pccard_get_status(s, p_dev, &buf->status); @@ -898,7 +898,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, goto free_out; } - ret = CS_BAD_ARGS; + ret = -EINVAL; if (!(buf->conf_reg.Function && (buf->conf_reg.Function >= s->functions))) { @@ -970,7 +970,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, case -ENOSYS: err = ret; break; - case CS_BAD_ARGS: case CS_BAD_TUPLE: + case CS_BAD_TUPLE: err = -EINVAL; break; case -ENOMEM: err = -ENOSPC; break; |