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_ioctl.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_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, | |||
836 | case DS_GET_CONFIGURATION_INFO: | 836 | case DS_GET_CONFIGURATION_INFO: |
837 | if (buf->config.Function && | 837 | if (buf->config.Function && |
838 | (buf->config.Function >= s->functions)) | 838 | (buf->config.Function >= s->functions)) |
839 | ret = CS_BAD_ARGS; | 839 | ret = -EINVAL; |
840 | else { | 840 | else { |
841 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function); | 841 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function); |
842 | ret = pccard_get_configuration_info(s, p_dev, &buf->config); | 842 | ret = pccard_get_configuration_info(s, p_dev, &buf->config); |
@@ -867,7 +867,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
867 | case DS_GET_STATUS: | 867 | case DS_GET_STATUS: |
868 | if (buf->status.Function && | 868 | if (buf->status.Function && |
869 | (buf->status.Function >= s->functions)) | 869 | (buf->status.Function >= s->functions)) |
870 | ret = CS_BAD_ARGS; | 870 | ret = -EINVAL; |
871 | else { | 871 | else { |
872 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function); | 872 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function); |
873 | ret = pccard_get_status(s, p_dev, &buf->status); | 873 | ret = pccard_get_status(s, p_dev, &buf->status); |
@@ -898,7 +898,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
898 | goto free_out; | 898 | goto free_out; |
899 | } | 899 | } |
900 | 900 | ||
901 | ret = CS_BAD_ARGS; | 901 | ret = -EINVAL; |
902 | 902 | ||
903 | if (!(buf->conf_reg.Function && | 903 | if (!(buf->conf_reg.Function && |
904 | (buf->conf_reg.Function >= s->functions))) { | 904 | (buf->conf_reg.Function >= s->functions))) { |
@@ -970,7 +970,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
970 | case -ENOSYS: | 970 | case -ENOSYS: |
971 | err = ret; | 971 | err = ret; |
972 | break; | 972 | break; |
973 | case CS_BAD_ARGS: case CS_BAD_TUPLE: | 973 | case CS_BAD_TUPLE: |
974 | err = -EINVAL; break; | 974 | err = -EINVAL; break; |
975 | case -ENOMEM: | 975 | case -ENOMEM: |
976 | err = -ENOSPC; break; | 976 | err = -ENOSPC; break; |