aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2009-10-24 09:57:22 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-09 02:30:06 -0500
commit9cb495bb41f07a3ebfc60d3b9d26017a1fd7050c (patch)
treef2dda0b4dfdf0c27eaa28d4383b38dab8aab57f0 /drivers
parent9b44de2015ff4a2ed1d56efedfcc72b917d356a6 (diff)
pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}
As all in-tree drivers have been converted to not use cs_error() any more, drop these functions and definitions, and update the Documentation. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
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;