summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pcmcia_ioctl.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-03 11:58:53 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-23 02:29:55 +0200
commit610e23749e87920136e1a221266a43cb7e3823f1 (patch)
tree5696af5b6e7be04e17a852e6c810798930a9b6c4 /drivers/pcmcia/pcmcia_ioctl.c
parent635d19bea0e91df473a81391ec8f3db2d049a218 (diff)
pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE
CS_BAD_TYPE was only used in cs.c and already properly annotated by error messages. CS_BAD_ATTRIBUTE and CS_BAD_PAGE mean a badly written driver, so ds_dbg() output and -EINVAL seems to be enough. (includes bugfix from and Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> ) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index a6289e5a75e..e27c71ebfda 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -964,19 +964,19 @@ static int ds_ioctl(struct inode * inode, struct file * file,
if ((err == 0) && (ret != 0)) {
ds_dbg(2, "ds_ioctl: ret = %d\n", ret);
switch (ret) {
- case CS_BAD_SOCKET: case CS_NO_CARD:
- err = -ENODEV; break;
- case CS_BAD_ARGS: case CS_BAD_ATTRIBUTE: case CS_BAD_IRQ:
+ case -ENODEV:
+ case -EINVAL:
+ case -EBUSY:
+ case -ENOSYS:
+ err = ret;
+ break;
+ case CS_BAD_ARGS: case CS_BAD_IRQ:
case CS_BAD_TUPLE:
err = -EINVAL; break;
- case CS_IN_USE:
- err = -EBUSY; break;
- case CS_OUT_OF_RESOURCE:
+ case -ENOMEM:
err = -ENOSPC; break;
case -ENOSPC:
err = -ENODATA; break;
- case -ENOSYS:
- err = -ENOSYS; break;
default:
err = -EIO; break;
}