Commit 5ff87db6 authored by Dominik Brodowski's avatar Dominik Brodowski

pcmcia: deprecate unused CS_ error codes

Deprecate unused CS_ error codes by replacing their definitions with
generic error messages, and removing them from the error_t lookup table.
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 4c89e88b
...@@ -75,29 +75,19 @@ typedef struct lookup_t { ...@@ -75,29 +75,19 @@ typedef struct lookup_t {
static const lookup_t error_table[] = { static const lookup_t error_table[] = {
{ CS_SUCCESS, "Operation succeeded" }, { CS_SUCCESS, "Operation succeeded" },
{ CS_BAD_ADAPTER, "Bad adapter" },
{ CS_BAD_ATTRIBUTE, "Bad attribute", }, { CS_BAD_ATTRIBUTE, "Bad attribute", },
{ CS_BAD_BASE, "Bad base address" }, { CS_BAD_BASE, "Bad base address" },
{ CS_BAD_EDC, "Bad EDC" },
{ CS_BAD_IRQ, "Bad IRQ" }, { CS_BAD_IRQ, "Bad IRQ" },
{ CS_BAD_OFFSET, "Bad offset" }, { CS_BAD_OFFSET, "Bad offset" },
{ CS_BAD_PAGE, "Bad page number" }, { CS_BAD_PAGE, "Bad page number" },
{ CS_READ_FAILURE, "Read failure" },
{ CS_BAD_SIZE, "Bad size" }, { CS_BAD_SIZE, "Bad size" },
{ CS_BAD_SOCKET, "Bad socket" },
{ CS_BAD_TYPE, "Bad type" }, { CS_BAD_TYPE, "Bad type" },
{ CS_BAD_VCC, "Bad Vcc" }, { CS_BAD_VCC, "Bad Vcc" },
{ CS_BAD_VPP, "Bad Vpp" }, { CS_BAD_VPP, "Bad Vpp" },
{ CS_BAD_WINDOW, "Bad window" },
{ CS_WRITE_FAILURE, "Write failure" },
{ CS_NO_CARD, "No card present" }, { CS_NO_CARD, "No card present" },
{ CS_UNSUPPORTED_FUNCTION, "Usupported function" }, { CS_UNSUPPORTED_FUNCTION, "Usupported function" },
{ CS_UNSUPPORTED_MODE, "Unsupported mode" }, { CS_UNSUPPORTED_MODE, "Unsupported mode" },
{ CS_BAD_SPEED, "Bad speed" },
{ CS_BUSY, "Resource busy" },
{ CS_GENERAL_FAILURE, "General failure" }, { CS_GENERAL_FAILURE, "General failure" },
{ CS_WRITE_PROTECTED, "Write protected" },
{ CS_BAD_ARG_LENGTH, "Bad argument length" },
{ CS_BAD_ARGS, "Bad arguments" }, { CS_BAD_ARGS, "Bad arguments" },
{ CS_CONFIGURATION_LOCKED, "Configuration locked" }, { CS_CONFIGURATION_LOCKED, "Configuration locked" },
{ CS_IN_USE, "Resource in use" }, { CS_IN_USE, "Resource in use" },
......
...@@ -289,29 +289,29 @@ typedef struct error_info_t { ...@@ -289,29 +289,29 @@ typedef struct error_info_t {
/* Return codes */ /* Return codes */
#define CS_SUCCESS 0x00 #define CS_SUCCESS 0x00
#define CS_BAD_ADAPTER 0x01 #define CS_BAD_ADAPTER -ENODEV
#define CS_BAD_ATTRIBUTE 0x02 #define CS_BAD_ATTRIBUTE 0x02
#define CS_BAD_BASE 0x03 #define CS_BAD_BASE 0x03
#define CS_BAD_EDC 0x04 #define CS_BAD_EDC -ENODEV
#define CS_BAD_IRQ 0x06 #define CS_BAD_IRQ 0x06
#define CS_BAD_OFFSET 0x07 #define CS_BAD_OFFSET 0x07
#define CS_BAD_PAGE 0x08 #define CS_BAD_PAGE 0x08
#define CS_READ_FAILURE 0x09 #define CS_READ_FAILURE -EIO
#define CS_BAD_SIZE 0x0a #define CS_BAD_SIZE 0x0a
#define CS_BAD_SOCKET 0x0b #define CS_BAD_SOCKET -EINVAL
#define CS_BAD_TYPE 0x0d #define CS_BAD_TYPE 0x0d
#define CS_BAD_VCC 0x0e #define CS_BAD_VCC 0x0e
#define CS_BAD_VPP 0x0f #define CS_BAD_VPP 0x0f
#define CS_BAD_WINDOW 0x11 #define CS_BAD_WINDOW -ENODEV
#define CS_WRITE_FAILURE 0x12 #define CS_WRITE_FAILURE -EIO
#define CS_NO_CARD 0x14 #define CS_NO_CARD 0x14
#define CS_UNSUPPORTED_FUNCTION 0x15 #define CS_UNSUPPORTED_FUNCTION 0x15
#define CS_UNSUPPORTED_MODE 0x16 #define CS_UNSUPPORTED_MODE 0x16
#define CS_BAD_SPEED 0x17 #define CS_BAD_SPEED -ENODEV
#define CS_BUSY 0x18 #define CS_BUSY -ENODEV
#define CS_GENERAL_FAILURE 0x19 #define CS_GENERAL_FAILURE 0x19
#define CS_WRITE_PROTECTED 0x1a #define CS_WRITE_PROTECTED -EPERM
#define CS_BAD_ARG_LENGTH 0x1b #define CS_BAD_ARG_LENGTH -ENODEV
#define CS_BAD_ARGS 0x1c #define CS_BAD_ARGS 0x1c
#define CS_CONFIGURATION_LOCKED 0x1d #define CS_CONFIGURATION_LOCKED 0x1d
#define CS_IN_USE 0x1e #define CS_IN_USE 0x1e
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment