aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/ds.c101
1 files changed, 0 insertions, 101 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 5b069aeaf17a..05893d41dd41 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -46,107 +46,6 @@ spinlock_t pcmcia_dev_list_lock;
46 46
47/*====================================================================*/ 47/*====================================================================*/
48 48
49/* code which was in cs.c before */
50
51/* String tables for error messages */
52
53typedef struct lookup_t {
54 const int key;
55 const char *msg;
56} lookup_t;
57
58static const lookup_t error_table[] = {
59 { 0, "Operation succeeded" },
60 { -EIO, "Input/Output error" },
61 { -ENODEV, "No card present" },
62 { -EINVAL, "Bad parameter" },
63 { -EACCES, "Configuration locked" },
64 { -EBUSY, "Resource in use" },
65 { -ENOSPC, "No more items" },
66 { -ENOMEM, "Out of resource" },
67};
68
69
70static const lookup_t service_table[] = {
71 { AccessConfigurationRegister, "AccessConfigurationRegister" },
72 { AddSocketServices, "AddSocketServices" },
73 { AdjustResourceInfo, "AdjustResourceInfo" },
74 { CheckEraseQueue, "CheckEraseQueue" },
75 { CloseMemory, "CloseMemory" },
76 { DeregisterClient, "DeregisterClient" },
77 { DeregisterEraseQueue, "DeregisterEraseQueue" },
78 { GetCardServicesInfo, "GetCardServicesInfo" },
79 { GetClientInfo, "GetClientInfo" },
80 { GetConfigurationInfo, "GetConfigurationInfo" },
81 { GetEventMask, "GetEventMask" },
82 { GetFirstClient, "GetFirstClient" },
83 { GetFirstRegion, "GetFirstRegion" },
84 { GetFirstTuple, "GetFirstTuple" },
85 { GetNextClient, "GetNextClient" },
86 { GetNextRegion, "GetNextRegion" },
87 { GetNextTuple, "GetNextTuple" },
88 { GetStatus, "GetStatus" },
89 { GetTupleData, "GetTupleData" },
90 { MapMemPage, "MapMemPage" },
91 { ModifyConfiguration, "ModifyConfiguration" },
92 { ModifyWindow, "ModifyWindow" },
93 { OpenMemory, "OpenMemory" },
94 { ParseTuple, "ParseTuple" },
95 { ReadMemory, "ReadMemory" },
96 { RegisterClient, "RegisterClient" },
97 { RegisterEraseQueue, "RegisterEraseQueue" },
98 { RegisterMTD, "RegisterMTD" },
99 { ReleaseConfiguration, "ReleaseConfiguration" },
100 { ReleaseIO, "ReleaseIO" },
101 { ReleaseIRQ, "ReleaseIRQ" },
102 { ReleaseWindow, "ReleaseWindow" },
103 { RequestConfiguration, "RequestConfiguration" },
104 { RequestIO, "RequestIO" },
105 { RequestIRQ, "RequestIRQ" },
106 { RequestSocketMask, "RequestSocketMask" },
107 { RequestWindow, "RequestWindow" },
108 { ResetCard, "ResetCard" },
109 { SetEventMask, "SetEventMask" },
110 { ValidateCIS, "ValidateCIS" },
111 { WriteMemory, "WriteMemory" },
112 { BindDevice, "BindDevice" },
113 { BindMTD, "BindMTD" },
114 { ReportError, "ReportError" },
115 { SuspendCard, "SuspendCard" },
116 { ResumeCard, "ResumeCard" },
117 { EjectCard, "EjectCard" },
118 { InsertCard, "InsertCard" },
119 { ReplaceCIS, "ReplaceCIS" }
120};
121
122const char *pcmcia_error_func(int func)
123{
124 int i;
125
126 for (i = 0; i < ARRAY_SIZE(service_table); i++)
127 if (service_table[i].key == func)
128 return service_table[i].msg;
129
130 return "Unknown service number";
131}
132EXPORT_SYMBOL(pcmcia_error_func);
133
134const char *pcmcia_error_ret(int ret)
135{
136 int i;
137
138 for (i = 0; i < ARRAY_SIZE(error_table); i++)
139 if (error_table[i].key == ret)
140 return error_table[i].msg;
141
142 return "unknown";
143}
144EXPORT_SYMBOL(pcmcia_error_ret);
145
146/*======================================================================*/
147
148
149
150static void pcmcia_check_driver(struct pcmcia_driver *p_drv) 49static void pcmcia_check_driver(struct pcmcia_driver *p_drv)
151{ 50{
152 struct pcmcia_device_id *did = p_drv->id_table; 51 struct pcmcia_device_id *did = p_drv->id_table;