aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-03 04:07:45 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-22 20:29:26 -0400
commit4c89e88bfde6a3c179790e21004f24e09a058290 (patch)
tree2895a308d64aeabb5fde776d92572a51444d835b
parent1a53088c101789bfca431de709ff6e45e8c77003 (diff)
pcmcia: deprecate CS_SUCCESS
Instead of using own error or success codes, the PCMCIA code should rely on the generic return values. Therefore, replace all occurrences of CS_SUCCESS with 0. CC: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/bluetooth/bluecard_cs.c8
-rw-r--r--drivers/bluetooth/bt3c_cs.c4
-rw-r--r--drivers/bluetooth/btuart_cs.c4
-rw-r--r--drivers/bluetooth/dtl1_cs.c4
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c4
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c36
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c4
-rw-r--r--drivers/isdn/hisax/avma1_cs.c4
-rw-r--r--drivers/isdn/hisax/elsa_cs.c6
-rw-r--r--drivers/isdn/hisax/teles_cs.c6
-rw-r--r--drivers/mtd/maps/pcmciamtd.c17
-rw-r--r--drivers/net/pcmcia/3c574_cs.c7
-rw-r--r--drivers/net/pcmcia/3c589_cs.c7
-rw-r--r--drivers/net/pcmcia/axnet_cs.c7
-rw-r--r--drivers/net/pcmcia/com20020_cs.c8
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c19
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c2
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c7
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c45
-rw-r--r--drivers/net/wireless/b43/pcmcia.c14
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c22
-rw-r--r--drivers/net/wireless/netwave_cs.c5
-rw-r--r--drivers/net/wireless/ray_cs.c4
-rw-r--r--drivers/net/wireless/wavelan_cs.c16
-rw-r--r--drivers/net/wireless/wl3501_cs.c4
-rw-r--r--drivers/pcmcia/cardbus.c2
-rw-r--r--drivers/pcmcia/cistpl.c73
-rw-r--r--drivers/pcmcia/cs.c14
-rw-r--r--drivers/pcmcia/ds.c2
-rw-r--r--drivers/pcmcia/ds_internal.h10
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c14
-rw-r--r--drivers/pcmcia/pcmcia_resource.c26
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c4
-rw-r--r--drivers/serial/serial_cs.c16
-rw-r--r--drivers/ssb/pcmcia.c20
35 files changed, 233 insertions, 212 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index bcf57927b7a8..e6ee21d99d92 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -901,23 +901,23 @@ static int bluecard_config(struct pcmcia_device *link)
901 for (n = 0; n < 0x400; n += 0x40) { 901 for (n = 0; n < 0x400; n += 0x40) {
902 link->io.BasePort1 = n ^ 0x300; 902 link->io.BasePort1 = n ^ 0x300;
903 i = pcmcia_request_io(link, &link->io); 903 i = pcmcia_request_io(link, &link->io);
904 if (i == CS_SUCCESS) 904 if (i == 0)
905 break; 905 break;
906 } 906 }
907 907
908 if (i != CS_SUCCESS) { 908 if (i != 0) {
909 cs_error(link, RequestIO, i); 909 cs_error(link, RequestIO, i);
910 goto failed; 910 goto failed;
911 } 911 }
912 912
913 i = pcmcia_request_irq(link, &link->irq); 913 i = pcmcia_request_irq(link, &link->irq);
914 if (i != CS_SUCCESS) { 914 if (i != 0) {
915 cs_error(link, RequestIRQ, i); 915 cs_error(link, RequestIRQ, i);
916 link->irq.AssignedIRQ = 0; 916 link->irq.AssignedIRQ = 0;
917 } 917 }
918 918
919 i = pcmcia_request_configuration(link, &link->conf); 919 i = pcmcia_request_configuration(link, &link->conf);
920 if (i != CS_SUCCESS) { 920 if (i != 0) {
921 cs_error(link, RequestConfiguration, i); 921 cs_error(link, RequestConfiguration, i);
922 goto failed; 922 goto failed;
923 } 923 }
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 3fd8022a6351..156edfd7e10d 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -743,13 +743,13 @@ static int bt3c_config(struct pcmcia_device *link)
743 743
744found_port: 744found_port:
745 i = pcmcia_request_irq(link, &link->irq); 745 i = pcmcia_request_irq(link, &link->irq);
746 if (i != CS_SUCCESS) { 746 if (i != 0) {
747 cs_error(link, RequestIRQ, i); 747 cs_error(link, RequestIRQ, i);
748 link->irq.AssignedIRQ = 0; 748 link->irq.AssignedIRQ = 0;
749 } 749 }
750 750
751 i = pcmcia_request_configuration(link, &link->conf); 751 i = pcmcia_request_configuration(link, &link->conf);
752 if (i != CS_SUCCESS) { 752 if (i != 0) {
753 cs_error(link, RequestConfiguration, i); 753 cs_error(link, RequestConfiguration, i);
754 goto failed; 754 goto failed;
755 } 755 }
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 17183125434f..8e556b7ff9f6 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -672,13 +672,13 @@ static int btuart_config(struct pcmcia_device *link)
672 672
673found_port: 673found_port:
674 i = pcmcia_request_irq(link, &link->irq); 674 i = pcmcia_request_irq(link, &link->irq);
675 if (i != CS_SUCCESS) { 675 if (i != 0) {
676 cs_error(link, RequestIRQ, i); 676 cs_error(link, RequestIRQ, i);
677 link->irq.AssignedIRQ = 0; 677 link->irq.AssignedIRQ = 0;
678 } 678 }
679 679
680 i = pcmcia_request_configuration(link, &link->conf); 680 i = pcmcia_request_configuration(link, &link->conf);
681 if (i != CS_SUCCESS) { 681 if (i != 0) {
682 cs_error(link, RequestConfiguration, i); 682 cs_error(link, RequestConfiguration, i);
683 goto failed; 683 goto failed;
684 } 684 }
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index ec12560e0342..e6e6b037695a 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -617,13 +617,13 @@ static int dtl1_config(struct pcmcia_device *link)
617 goto failed; 617 goto failed;
618 618
619 i = pcmcia_request_irq(link, &link->irq); 619 i = pcmcia_request_irq(link, &link->irq);
620 if (i != CS_SUCCESS) { 620 if (i != 0) {
621 cs_error(link, RequestIRQ, i); 621 cs_error(link, RequestIRQ, i);
622 link->irq.AssignedIRQ = 0; 622 link->irq.AssignedIRQ = 0;
623 } 623 }
624 624
625 i = pcmcia_request_configuration(link, &link->conf); 625 i = pcmcia_request_configuration(link, &link->conf);
626 if (i != CS_SUCCESS) { 626 if (i != 0) {
627 cs_error(link, RequestConfiguration, i); 627 cs_error(link, RequestConfiguration, i);
628 goto failed; 628 goto failed;
629 } 629 }
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index e047bac56f0e..2d7c906435b7 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -567,8 +567,8 @@ static int reader_config(struct pcmcia_device *link, int devno)
567 567
568 link->conf.IntType = 00000002; 568 link->conf.IntType = 00000002;
569 569
570 if ((fail_rc = pcmcia_request_configuration(link,&link->conf)) 570 fail_rc = pcmcia_request_configuration(link, &link->conf);
571 !=CS_SUCCESS) { 571 if (fail_rc != 0) {
572 dev_printk(KERN_INFO, &handle_to_dev(link), 572 dev_printk(KERN_INFO, &handle_to_dev(link),
573 "pcmcia_request_configuration failed 0x%x\n", 573 "pcmcia_request_configuration failed 0x%x\n",
574 fail_rc); 574 fail_rc);
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 1f520e544d45..24ffe0324e53 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -67,7 +67,7 @@ static void signalled_reboot_work(struct work_struct *work_reboot)
67 struct pcmcia_device *link = ipw->link; 67 struct pcmcia_device *link = ipw->link;
68 int ret = pccard_reset_card(link->socket); 68 int ret = pccard_reset_card(link->socket);
69 69
70 if (ret != CS_SUCCESS) 70 if (ret != 0)
71 cs_error(link, ResetCard, ret); 71 cs_error(link, ResetCard, ret);
72} 72}
73 73
@@ -104,7 +104,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
104 while (ret == 0) { 104 while (ret == 0) {
105 ret = pcmcia_get_tuple_data(link, &tuple); 105 ret = pcmcia_get_tuple_data(link, &tuple);
106 106
107 if (ret != CS_SUCCESS) { 107 if (ret != 0) {
108 cs_error(link, GetTupleData, ret); 108 cs_error(link, GetTupleData, ret);
109 goto exit0; 109 goto exit0;
110 } 110 }
@@ -115,21 +115,21 @@ static int config_ipwireless(struct ipw_dev *ipw)
115 115
116 ret = pcmcia_get_first_tuple(link, &tuple); 116 ret = pcmcia_get_first_tuple(link, &tuple);
117 117
118 if (ret != CS_SUCCESS) { 118 if (ret != 0) {
119 cs_error(link, GetFirstTuple, ret); 119 cs_error(link, GetFirstTuple, ret);
120 goto exit0; 120 goto exit0;
121 } 121 }
122 122
123 ret = pcmcia_get_tuple_data(link, &tuple); 123 ret = pcmcia_get_tuple_data(link, &tuple);
124 124
125 if (ret != CS_SUCCESS) { 125 if (ret != 0) {
126 cs_error(link, GetTupleData, ret); 126 cs_error(link, GetTupleData, ret);
127 goto exit0; 127 goto exit0;
128 } 128 }
129 129
130 ret = pcmcia_parse_tuple(link, &tuple, &parse); 130 ret = pcmcia_parse_tuple(link, &tuple, &parse);
131 131
132 if (ret != CS_SUCCESS) { 132 if (ret != 0) {
133 cs_error(link, ParseTuple, ret); 133 cs_error(link, ParseTuple, ret);
134 goto exit0; 134 goto exit0;
135 } 135 }
@@ -151,21 +151,21 @@ static int config_ipwireless(struct ipw_dev *ipw)
151 151
152 ret = pcmcia_get_first_tuple(link, &tuple); 152 ret = pcmcia_get_first_tuple(link, &tuple);
153 153
154 if (ret != CS_SUCCESS) { 154 if (ret != 0) {
155 cs_error(link, GetFirstTuple, ret); 155 cs_error(link, GetFirstTuple, ret);
156 goto exit0; 156 goto exit0;
157 } 157 }
158 158
159 ret = pcmcia_get_tuple_data(link, &tuple); 159 ret = pcmcia_get_tuple_data(link, &tuple);
160 160
161 if (ret != CS_SUCCESS) { 161 if (ret != 0) {
162 cs_error(link, GetTupleData, ret); 162 cs_error(link, GetTupleData, ret);
163 goto exit0; 163 goto exit0;
164 } 164 }
165 165
166 ret = pcmcia_parse_tuple(link, &tuple, &parse); 166 ret = pcmcia_parse_tuple(link, &tuple, &parse);
167 167
168 if (ret != CS_SUCCESS) { 168 if (ret != 0) {
169 cs_error(link, GetTupleData, ret); 169 cs_error(link, GetTupleData, ret);
170 goto exit0; 170 goto exit0;
171 } 171 }
@@ -180,7 +180,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
180 180
181 ret = pcmcia_request_io(link, &link->io); 181 ret = pcmcia_request_io(link, &link->io);
182 182
183 if (ret != CS_SUCCESS) { 183 if (ret != 0) {
184 cs_error(link, RequestIO, ret); 184 cs_error(link, RequestIO, ret);
185 goto exit0; 185 goto exit0;
186 } 186 }
@@ -194,21 +194,21 @@ static int config_ipwireless(struct ipw_dev *ipw)
194 194
195 ret = pcmcia_get_first_tuple(link, &tuple); 195 ret = pcmcia_get_first_tuple(link, &tuple);
196 196
197 if (ret != CS_SUCCESS) { 197 if (ret != 0) {
198 cs_error(link, GetFirstTuple, ret); 198 cs_error(link, GetFirstTuple, ret);
199 goto exit1; 199 goto exit1;
200 } 200 }
201 201
202 ret = pcmcia_get_tuple_data(link, &tuple); 202 ret = pcmcia_get_tuple_data(link, &tuple);
203 203
204 if (ret != CS_SUCCESS) { 204 if (ret != 0) {
205 cs_error(link, GetTupleData, ret); 205 cs_error(link, GetTupleData, ret);
206 goto exit1; 206 goto exit1;
207 } 207 }
208 208
209 ret = pcmcia_parse_tuple(link, &tuple, &parse); 209 ret = pcmcia_parse_tuple(link, &tuple, &parse);
210 210
211 if (ret != CS_SUCCESS) { 211 if (ret != 0) {
212 cs_error(link, ParseTuple, ret); 212 cs_error(link, ParseTuple, ret);
213 goto exit1; 213 goto exit1;
214 } 214 }
@@ -226,7 +226,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
226 ret = pcmcia_request_window(&link, &ipw->request_common_memory, 226 ret = pcmcia_request_window(&link, &ipw->request_common_memory,
227 &ipw->handle_common_memory); 227 &ipw->handle_common_memory);
228 228
229 if (ret != CS_SUCCESS) { 229 if (ret != 0) {
230 cs_error(link, RequestWindow, ret); 230 cs_error(link, RequestWindow, ret);
231 goto exit1; 231 goto exit1;
232 } 232 }
@@ -238,7 +238,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
238 ret = pcmcia_map_mem_page(ipw->handle_common_memory, 238 ret = pcmcia_map_mem_page(ipw->handle_common_memory,
239 &memreq_common_memory); 239 &memreq_common_memory);
240 240
241 if (ret != CS_SUCCESS) { 241 if (ret != 0) {
242 cs_error(link, MapMemPage, ret); 242 cs_error(link, MapMemPage, ret);
243 goto exit1; 243 goto exit1;
244 } 244 }
@@ -260,7 +260,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
260 ret = pcmcia_request_window(&link, &ipw->request_attr_memory, 260 ret = pcmcia_request_window(&link, &ipw->request_attr_memory,
261 &ipw->handle_attr_memory); 261 &ipw->handle_attr_memory);
262 262
263 if (ret != CS_SUCCESS) { 263 if (ret != 0) {
264 cs_error(link, RequestWindow, ret); 264 cs_error(link, RequestWindow, ret);
265 goto exit2; 265 goto exit2;
266 } 266 }
@@ -271,7 +271,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
271 ret = pcmcia_map_mem_page(ipw->handle_attr_memory, 271 ret = pcmcia_map_mem_page(ipw->handle_attr_memory,
272 &memreq_attr_memory); 272 &memreq_attr_memory);
273 273
274 if (ret != CS_SUCCESS) { 274 if (ret != 0) {
275 cs_error(link, MapMemPage, ret); 275 cs_error(link, MapMemPage, ret);
276 goto exit2; 276 goto exit2;
277 } 277 }
@@ -291,7 +291,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
291 291
292 ret = pcmcia_request_irq(link, &link->irq); 292 ret = pcmcia_request_irq(link, &link->irq);
293 293
294 if (ret != CS_SUCCESS) { 294 if (ret != 0) {
295 cs_error(link, RequestIRQ, ret); 295 cs_error(link, RequestIRQ, ret);
296 goto exit3; 296 goto exit3;
297 } 297 }
@@ -331,7 +331,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
331 */ 331 */
332 ret = pcmcia_request_configuration(link, &link->conf); 332 ret = pcmcia_request_configuration(link, &link->conf);
333 333
334 if (ret != CS_SUCCESS) { 334 if (ret != 0) {
335 cs_error(link, RequestConfiguration, ret); 335 cs_error(link, RequestConfiguration, ret);
336 goto exit4; 336 goto exit4;
337 } 337 }
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index 388046539705..c72565520e41 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -197,7 +197,7 @@ static int avmcs_config(struct pcmcia_device *link)
197 * allocate an interrupt line 197 * allocate an interrupt line
198 */ 198 */
199 i = pcmcia_request_irq(link, &link->irq); 199 i = pcmcia_request_irq(link, &link->irq);
200 if (i != CS_SUCCESS) { 200 if (i != 0) {
201 cs_error(link, RequestIRQ, i); 201 cs_error(link, RequestIRQ, i);
202 /* undo */ 202 /* undo */
203 pcmcia_disable_device(link); 203 pcmcia_disable_device(link);
@@ -208,7 +208,7 @@ static int avmcs_config(struct pcmcia_device *link)
208 * configure the PCMCIA socket 208 * configure the PCMCIA socket
209 */ 209 */
210 i = pcmcia_request_configuration(link, &link->conf); 210 i = pcmcia_request_configuration(link, &link->conf);
211 if (i != CS_SUCCESS) { 211 if (i != 0) {
212 cs_error(link, RequestConfiguration, i); 212 cs_error(link, RequestConfiguration, i);
213 pcmcia_disable_device(link); 213 pcmcia_disable_device(link);
214 break; 214 break;
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 8fd3ca0fb93a..23560c897ec3 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -217,7 +217,7 @@ static int avma1cs_config(struct pcmcia_device *link)
217 * allocate an interrupt line 217 * allocate an interrupt line
218 */ 218 */
219 i = pcmcia_request_irq(link, &link->irq); 219 i = pcmcia_request_irq(link, &link->irq);
220 if (i != CS_SUCCESS) { 220 if (i != 0) {
221 cs_error(link, RequestIRQ, i); 221 cs_error(link, RequestIRQ, i);
222 /* undo */ 222 /* undo */
223 pcmcia_disable_device(link); 223 pcmcia_disable_device(link);
@@ -228,7 +228,7 @@ static int avma1cs_config(struct pcmcia_device *link)
228 * configure the PCMCIA socket 228 * configure the PCMCIA socket
229 */ 229 */
230 i = pcmcia_request_configuration(link, &link->conf); 230 i = pcmcia_request_configuration(link, &link->conf);
231 if (i != CS_SUCCESS) { 231 if (i != 0) {
232 cs_error(link, RequestConfiguration, i); 232 cs_error(link, RequestConfiguration, i);
233 pcmcia_disable_device(link); 233 pcmcia_disable_device(link);
234 break; 234 break;
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 2bf0016dea5e..f4d0fe29bcf8 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -238,20 +238,20 @@ static int elsa_cs_config(struct pcmcia_device *link)
238 dev = link->priv; 238 dev = link->priv;
239 239
240 i = pcmcia_loop_config(link, elsa_cs_configcheck, NULL); 240 i = pcmcia_loop_config(link, elsa_cs_configcheck, NULL);
241 if (i != CS_SUCCESS) { 241 if (i != 0) {
242 last_fn = RequestIO; 242 last_fn = RequestIO;
243 goto cs_failed; 243 goto cs_failed;
244 } 244 }
245 245
246 i = pcmcia_request_irq(link, &link->irq); 246 i = pcmcia_request_irq(link, &link->irq);
247 if (i != CS_SUCCESS) { 247 if (i != 0) {
248 link->irq.AssignedIRQ = 0; 248 link->irq.AssignedIRQ = 0;
249 last_fn = RequestIRQ; 249 last_fn = RequestIRQ;
250 goto cs_failed; 250 goto cs_failed;
251 } 251 }
252 252
253 i = pcmcia_request_configuration(link, &link->conf); 253 i = pcmcia_request_configuration(link, &link->conf);
254 if (i != CS_SUCCESS) { 254 if (i != 0) {
255 last_fn = RequestConfiguration; 255 last_fn = RequestConfiguration;
256 goto cs_failed; 256 goto cs_failed;
257 } 257 }
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 21cabd0aadbe..623d111544d4 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -228,20 +228,20 @@ static int teles_cs_config(struct pcmcia_device *link)
228 dev = link->priv; 228 dev = link->priv;
229 229
230 i = pcmcia_loop_config(link, teles_cs_configcheck, NULL); 230 i = pcmcia_loop_config(link, teles_cs_configcheck, NULL);
231 if (i != CS_SUCCESS) { 231 if (i != 0) {
232 last_fn = RequestIO; 232 last_fn = RequestIO;
233 goto cs_failed; 233 goto cs_failed;
234 } 234 }
235 235
236 i = pcmcia_request_irq(link, &link->irq); 236 i = pcmcia_request_irq(link, &link->irq);
237 if (i != CS_SUCCESS) { 237 if (i != 0) {
238 link->irq.AssignedIRQ = 0; 238 link->irq.AssignedIRQ = 0;
239 last_fn = RequestIRQ; 239 last_fn = RequestIRQ;
240 goto cs_failed; 240 goto cs_failed;
241 } 241 }
242 242
243 i = pcmcia_request_configuration(link, &link->conf); 243 i = pcmcia_request_configuration(link, &link->conf);
244 if (i != CS_SUCCESS) { 244 if (i != 0) {
245 last_fn = RequestConfiguration; 245 last_fn = RequestConfiguration;
246 goto cs_failed; 246 goto cs_failed;
247 } 247 }
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index 8861ca477dd9..27b3d96b7124 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -118,7 +118,8 @@ static caddr_t remap_window(struct map_info *map, unsigned long to)
118 DEBUG(2, "Remapping window from 0x%8.8x to 0x%8.8x", 118 DEBUG(2, "Remapping window from 0x%8.8x to 0x%8.8x",
119 dev->offset, mrq.CardOffset); 119 dev->offset, mrq.CardOffset);
120 mrq.Page = 0; 120 mrq.Page = 0;
121 if( (ret = pcmcia_map_mem_page(win, &mrq)) != CS_SUCCESS) { 121 ret = pcmcia_map_mem_page(win, &mrq);
122 if (ret != 0) {
122 cs_error(dev->p_dev, MapMemPage, ret); 123 cs_error(dev->p_dev, MapMemPage, ret);
123 return NULL; 124 return NULL;
124 } 125 }
@@ -326,9 +327,8 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on)
326 327
327 DEBUG(2, "dev = %p on = %d vpp = %d\n", dev, on, dev->vpp); 328 DEBUG(2, "dev = %p on = %d vpp = %d\n", dev, on, dev->vpp);
328 ret = pcmcia_modify_configuration(link, &mod); 329 ret = pcmcia_modify_configuration(link, &mod);
329 if(ret != CS_SUCCESS) { 330 if (ret != 0)
330 cs_error(link, ModifyConfiguration, ret); 331 cs_error(link, ModifyConfiguration, ret);
331 }
332} 332}
333 333
334 334
@@ -368,14 +368,14 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *link,
368 tuple.DesiredTuple = RETURN_FIRST_TUPLE; 368 tuple.DesiredTuple = RETURN_FIRST_TUPLE;
369 369
370 rc = pcmcia_get_first_tuple(link, &tuple); 370 rc = pcmcia_get_first_tuple(link, &tuple);
371 while(rc == CS_SUCCESS) { 371 while (rc == 0) {
372 rc = pcmcia_get_tuple_data(link, &tuple); 372 rc = pcmcia_get_tuple_data(link, &tuple);
373 if(rc != CS_SUCCESS) { 373 if (rc != 0) {
374 cs_error(link, GetTupleData, rc); 374 cs_error(link, GetTupleData, rc);
375 break; 375 break;
376 } 376 }
377 rc = pcmcia_parse_tuple(link, &tuple, &parse); 377 rc = pcmcia_parse_tuple(link, &tuple, &parse);
378 if(rc != CS_SUCCESS) { 378 if (rc != 0) {
379 cs_error(link, ParseTuple, rc); 379 cs_error(link, ParseTuple, rc);
380 break; 380 break;
381 } 381 }
@@ -500,9 +500,8 @@ static int pcmciamtd_config(struct pcmcia_device *link)
500 500
501 DEBUG(2, "Validating CIS"); 501 DEBUG(2, "Validating CIS");
502 ret = pcmcia_validate_cis(link, NULL); 502 ret = pcmcia_validate_cis(link, NULL);
503 if(ret != CS_SUCCESS) { 503 if (ret != 0)
504 cs_error(link, GetTupleData, ret); 504 cs_error(link, GetTupleData, ret);
505 }
506 505
507 card_settings(dev, link, &new_name); 506 card_settings(dev, link, &new_name);
508 507
@@ -582,7 +581,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
582 link->conf.ConfigIndex = 0; 581 link->conf.ConfigIndex = 0;
583 DEBUG(2, "Setting Configuration"); 582 DEBUG(2, "Setting Configuration");
584 ret = pcmcia_request_configuration(link, &link->conf); 583 ret = pcmcia_request_configuration(link, &link->conf);
585 if(ret != CS_SUCCESS) { 584 if (ret != 0) {
586 cs_error(link, RequestConfiguration, ret); 585 cs_error(link, RequestConfiguration, ret);
587 if (dev->win_base) { 586 if (dev->win_base) {
588 iounmap(dev->win_base); 587 iounmap(dev->win_base);
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 7112fd5e0e1b..08c4dd896077 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -355,9 +355,10 @@ static int tc574_config(struct pcmcia_device *link)
355 for (i = j = 0; j < 0x400; j += 0x20) { 355 for (i = j = 0; j < 0x400; j += 0x20) {
356 link->io.BasePort1 = j ^ 0x300; 356 link->io.BasePort1 = j ^ 0x300;
357 i = pcmcia_request_io(link, &link->io); 357 i = pcmcia_request_io(link, &link->io);
358 if (i == CS_SUCCESS) break; 358 if (i == 0)
359 break;
359 } 360 }
360 if (i != CS_SUCCESS) { 361 if (i != 0) {
361 cs_error(link, RequestIO, i); 362 cs_error(link, RequestIO, i);
362 goto failed; 363 goto failed;
363 } 364 }
@@ -377,7 +378,7 @@ static int tc574_config(struct pcmcia_device *link)
377 tuple.TupleDataMax = 64; 378 tuple.TupleDataMax = 64;
378 tuple.TupleOffset = 0; 379 tuple.TupleOffset = 0;
379 tuple.DesiredTuple = 0x88; 380 tuple.DesiredTuple = 0x88;
380 if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { 381 if (pcmcia_get_first_tuple(link, &tuple) == 0) {
381 pcmcia_get_tuple_data(link, &tuple); 382 pcmcia_get_tuple_data(link, &tuple);
382 for (i = 0; i < 3; i++) 383 for (i = 0; i < 3; i++)
383 phys_addr[i] = htons(le16_to_cpu(buf[i])); 384 phys_addr[i] = htons(le16_to_cpu(buf[i]));
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 549a64558420..0b28d0d8ffa8 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -278,9 +278,10 @@ static int tc589_config(struct pcmcia_device *link)
278 if (multi && (j & 0x80)) continue; 278 if (multi && (j & 0x80)) continue;
279 link->io.BasePort1 = j ^ 0x300; 279 link->io.BasePort1 = j ^ 0x300;
280 i = pcmcia_request_io(link, &link->io); 280 i = pcmcia_request_io(link, &link->io);
281 if (i == CS_SUCCESS) break; 281 if (i == 0)
282 break;
282 } 283 }
283 if (i != CS_SUCCESS) { 284 if (i != 0) {
284 cs_error(link, RequestIO, i); 285 cs_error(link, RequestIO, i);
285 goto failed; 286 goto failed;
286 } 287 }
@@ -295,7 +296,7 @@ static int tc589_config(struct pcmcia_device *link)
295 /* The 3c589 has an extra EEPROM for configuration info, including 296 /* The 3c589 has an extra EEPROM for configuration info, including
296 the hardware address. The 3c562 puts the address in the CIS. */ 297 the hardware address. The 3c562 puts the address in the CIS. */
297 tuple.DesiredTuple = 0x88; 298 tuple.DesiredTuple = 0x88;
298 if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { 299 if (pcmcia_get_first_tuple(link, &tuple) == 0) {
299 pcmcia_get_tuple_data(link, &tuple); 300 pcmcia_get_tuple_data(link, &tuple);
300 for (i = 0; i < 3; i++) 301 for (i = 0; i < 3; i++)
301 phys_addr[i] = htons(le16_to_cpu(buf[i])); 302 phys_addr[i] = htons(le16_to_cpu(buf[i]));
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 061d889794c5..0bc641adce19 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -262,7 +262,7 @@ static int try_io_port(struct pcmcia_device *link)
262 if (link->io.NumPorts2 > 0) { 262 if (link->io.NumPorts2 > 0) {
263 /* for master/slave multifunction cards */ 263 /* for master/slave multifunction cards */
264 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 264 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
265 link->irq.Attributes = 265 link->irq.Attributes =
266 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; 266 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
267 } 267 }
268 } else { 268 } else {
@@ -276,7 +276,8 @@ static int try_io_port(struct pcmcia_device *link)
276 link->io.BasePort1 = j ^ 0x300; 276 link->io.BasePort1 = j ^ 0x300;
277 link->io.BasePort2 = (j ^ 0x300) + 0x10; 277 link->io.BasePort2 = (j ^ 0x300) + 0x10;
278 ret = pcmcia_request_io(link, &link->io); 278 ret = pcmcia_request_io(link, &link->io);
279 if (ret == CS_SUCCESS) return ret; 279 if (ret == 0)
280 return ret;
280 } 281 }
281 return ret; 282 return ret;
282 } else { 283 } else {
@@ -327,7 +328,7 @@ static int axnet_config(struct pcmcia_device *link)
327 /* don't trust the CIS on this; Linksys got it wrong */ 328 /* don't trust the CIS on this; Linksys got it wrong */
328 link->conf.Present = 0x63; 329 link->conf.Present = 0x63;
329 last_ret = pcmcia_loop_config(link, axnet_configcheck, NULL); 330 last_ret = pcmcia_loop_config(link, axnet_configcheck, NULL);
330 if (last_ret != CS_SUCCESS) { 331 if (last_ret != 0) {
331 cs_error(link, RequestIO, last_ret); 332 cs_error(link, RequestIO, last_ret);
332 goto failed; 333 goto failed;
333 } 334 }
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index ea9414c4d900..831090c75622 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -260,21 +260,21 @@ static int com20020_config(struct pcmcia_device *link)
260 DEBUG(0, "com20020_config(0x%p)\n", link); 260 DEBUG(0, "com20020_config(0x%p)\n", link);
261 261
262 DEBUG(1,"arcnet: baseport1 is %Xh\n", link->io.BasePort1); 262 DEBUG(1,"arcnet: baseport1 is %Xh\n", link->io.BasePort1);
263 i = !CS_SUCCESS; 263 i = -ENODEV;
264 if (!link->io.BasePort1) 264 if (!link->io.BasePort1)
265 { 265 {
266 for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) 266 for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10)
267 { 267 {
268 link->io.BasePort1 = ioaddr; 268 link->io.BasePort1 = ioaddr;
269 i = pcmcia_request_io(link, &link->io); 269 i = pcmcia_request_io(link, &link->io);
270 if (i == CS_SUCCESS) 270 if (i == 0)
271 break; 271 break;
272 } 272 }
273 } 273 }
274 else 274 else
275 i = pcmcia_request_io(link, &link->io); 275 i = pcmcia_request_io(link, &link->io);
276 276
277 if (i != CS_SUCCESS) 277 if (i != 0)
278 { 278 {
279 DEBUG(1,"arcnet: requestIO failed totally!\n"); 279 DEBUG(1,"arcnet: requestIO failed totally!\n");
280 goto failed; 280 goto failed;
@@ -287,7 +287,7 @@ static int com20020_config(struct pcmcia_device *link)
287 link->irq.AssignedIRQ, 287 link->irq.AssignedIRQ,
288 link->irq.IRQInfo1, link->irq.IRQInfo2); 288 link->irq.IRQInfo1, link->irq.IRQInfo2);
289 i = pcmcia_request_irq(link, &link->irq); 289 i = pcmcia_request_irq(link, &link->irq);
290 if (i != CS_SUCCESS) 290 if (i != 0)
291 { 291 {
292 DEBUG(1,"arcnet: requestIRQ failed totally!\n"); 292 DEBUG(1,"arcnet: requestIRQ failed totally!\n");
293 goto failed; 293 goto failed;
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index a550c9bd126f..0ffd981502e1 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -309,7 +309,8 @@ static int mfc_try_io_port(struct pcmcia_device *link)
309 printk(KERN_NOTICE "fmvj18x_cs: out of resource for serial\n"); 309 printk(KERN_NOTICE "fmvj18x_cs: out of resource for serial\n");
310 } 310 }
311 ret = pcmcia_request_io(link, &link->io); 311 ret = pcmcia_request_io(link, &link->io);
312 if (ret == CS_SUCCESS) return ret; 312 if (ret == 0)
313 return ret;
313 } 314 }
314 return ret; 315 return ret;
315} 316}
@@ -325,7 +326,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link)
325 for (ioaddr = 0x300; ioaddr < 0x3e0; ioaddr += 0x20) { 326 for (ioaddr = 0x300; ioaddr < 0x3e0; ioaddr += 0x20) {
326 link->io.BasePort1 = ioaddr; 327 link->io.BasePort1 = ioaddr;
327 ret = pcmcia_request_io(link, &link->io); 328 ret = pcmcia_request_io(link, &link->io);
328 if (ret == CS_SUCCESS) { 329 if (ret == 0) {
329 /* calculate ConfigIndex value */ 330 /* calculate ConfigIndex value */
330 link->conf.ConfigIndex = 331 link->conf.ConfigIndex =
331 ((link->io.BasePort1 & 0x0f0) >> 3) | 0x22; 332 ((link->io.BasePort1 & 0x0f0) >> 3) | 0x22;
@@ -356,7 +357,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
356 tuple.TupleOffset = 0; 357 tuple.TupleOffset = 0;
357 tuple.DesiredTuple = CISTPL_FUNCE; 358 tuple.DesiredTuple = CISTPL_FUNCE;
358 tuple.TupleOffset = 0; 359 tuple.TupleOffset = 0;
359 if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { 360 if (pcmcia_get_first_tuple(link, &tuple) == 0) {
360 /* Yes, I have CISTPL_FUNCE. Let's check CISTPL_MANFID */ 361 /* Yes, I have CISTPL_FUNCE. Let's check CISTPL_MANFID */
361 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; 362 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
362 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); 363 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
@@ -430,10 +431,10 @@ static int fmvj18x_config(struct pcmcia_device *link)
430 link->irq.Attributes = 431 link->irq.Attributes =
431 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT; 432 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT;
432 ret = mfc_try_io_port(link); 433 ret = mfc_try_io_port(link);
433 if (ret != CS_SUCCESS) goto cs_failed; 434 if (ret != 0) goto cs_failed;
434 } else if (cardtype == UNGERMANN) { 435 } else if (cardtype == UNGERMANN) {
435 ret = ungermann_try_io_port(link); 436 ret = ungermann_try_io_port(link);
436 if (ret != CS_SUCCESS) goto cs_failed; 437 if (ret != 0) goto cs_failed;
437 } else { 438 } else {
438 CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); 439 CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
439 } 440 }
@@ -565,7 +566,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)
565 req.Base = 0; req.Size = 0; 566 req.Base = 0; req.Size = 0;
566 req.AccessSpeed = 0; 567 req.AccessSpeed = 0;
567 i = pcmcia_request_window(&link, &req, &link->win); 568 i = pcmcia_request_window(&link, &req, &link->win);
568 if (i != CS_SUCCESS) { 569 if (i != 0) {
569 cs_error(link, RequestWindow, i); 570 cs_error(link, RequestWindow, i);
570 return -1; 571 return -1;
571 } 572 }
@@ -599,7 +600,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)
599 600
600 iounmap(base); 601 iounmap(base);
601 j = pcmcia_release_window(link->win); 602 j = pcmcia_release_window(link->win);
602 if (j != CS_SUCCESS) 603 if (j != 0)
603 cs_error(link, ReleaseWindow, j); 604 cs_error(link, ReleaseWindow, j);
604 return (i != 0x200) ? 0 : -1; 605 return (i != 0x200) ? 0 : -1;
605 606
@@ -620,7 +621,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link)
620 req.Base = 0; req.Size = 0; 621 req.Base = 0; req.Size = 0;
621 req.AccessSpeed = 0; 622 req.AccessSpeed = 0;
622 i = pcmcia_request_window(&link, &req, &link->win); 623 i = pcmcia_request_window(&link, &req, &link->win);
623 if (i != CS_SUCCESS) { 624 if (i != 0) {
624 cs_error(link, RequestWindow, i); 625 cs_error(link, RequestWindow, i);
625 return -1; 626 return -1;
626 } 627 }
@@ -642,7 +643,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link)
642 643
643 iounmap(base); 644 iounmap(base);
644 j = pcmcia_release_window(link->win); 645 j = pcmcia_release_window(link->win);
645 if (j != CS_SUCCESS) 646 if (j != 0)
646 cs_error(link, ReleaseWindow, j); 647 cs_error(link, ReleaseWindow, j);
647 return 0; 648 return 0;
648 649
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 4eafa4f42cff..cf3cca4642f2 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -238,7 +238,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
238 /* Try PRIMARY card at 0xA20-0xA23 */ 238 /* Try PRIMARY card at 0xA20-0xA23 */
239 link->io.BasePort1 = 0xA20; 239 link->io.BasePort1 = 0xA20;
240 i = pcmcia_request_io(link, &link->io); 240 i = pcmcia_request_io(link, &link->io);
241 if (i != CS_SUCCESS) { 241 if (i != 0) {
242 /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */ 242 /* Couldn't get 0xA20-0xA23. Try ALTERNATE at 0xA24-0xA27. */
243 link->io.BasePort1 = 0xA24; 243 link->io.BasePort1 = 0xA24;
244 CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); 244 CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index aa17434faa0e..1758952b3a38 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -310,7 +310,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
310 req.Base = 0; req.Size = 0; 310 req.Base = 0; req.Size = 0;
311 req.AccessSpeed = 0; 311 req.AccessSpeed = 0;
312 i = pcmcia_request_window(&link, &req, &link->win); 312 i = pcmcia_request_window(&link, &req, &link->win);
313 if (i != CS_SUCCESS) { 313 if (i != 0) {
314 cs_error(link, RequestWindow, i); 314 cs_error(link, RequestWindow, i);
315 return NULL; 315 return NULL;
316 } 316 }
@@ -333,7 +333,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
333 333
334 iounmap(virt); 334 iounmap(virt);
335 j = pcmcia_release_window(link->win); 335 j = pcmcia_release_window(link->win);
336 if (j != CS_SUCCESS) 336 if (j != 0)
337 cs_error(link, ReleaseWindow, j); 337 cs_error(link, ReleaseWindow, j);
338 return (i < NR_INFO) ? hw_info+i : NULL; 338 return (i < NR_INFO) ? hw_info+i : NULL;
339} /* get_hwinfo */ 339} /* get_hwinfo */
@@ -504,7 +504,8 @@ static int try_io_port(struct pcmcia_device *link)
504 link->io.BasePort1 = j ^ 0x300; 504 link->io.BasePort1 = j ^ 0x300;
505 link->io.BasePort2 = (j ^ 0x300) + 0x10; 505 link->io.BasePort2 = (j ^ 0x300) + 0x10;
506 ret = pcmcia_request_io(link, &link->io); 506 ret = pcmcia_request_io(link, &link->io);
507 if (ret == CS_SUCCESS) return ret; 507 if (ret == 0)
508 return ret;
508 } 509 }
509 return ret; 510 return ret;
510 } else { 511 } else {
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index b3f2085ddca9..267cbe0afd16 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -409,8 +409,11 @@ static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple,
409{ 409{
410 int i; 410 int i;
411 411
412 if ((i = pcmcia_get_first_tuple(handle, tuple)) != CS_SUCCESS || 412 i = pcmcia_get_first_tuple(handle, tuple);
413 (i = pcmcia_get_tuple_data(handle, tuple)) != CS_SUCCESS) 413 if (i != 0)
414 return i;
415 i = pcmcia_get_tuple_data(handle, tuple);
416 if (i != 0)
414 return i; 417 return i;
415 return pcmcia_parse_tuple(handle, tuple, parse); 418 return pcmcia_parse_tuple(handle, tuple, parse);
416} 419}
@@ -420,8 +423,8 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple,
420{ 423{
421 int i; 424 int i;
422 425
423 if ((i = pcmcia_get_next_tuple(handle, tuple)) != CS_SUCCESS || 426 if ((i = pcmcia_get_next_tuple(handle, tuple)) != 0 ||
424 (i = pcmcia_get_tuple_data(handle, tuple)) != CS_SUCCESS) 427 (i = pcmcia_get_tuple_data(handle, tuple)) != 0)
425 return i; 428 return i;
426 return pcmcia_parse_tuple(handle, tuple, parse); 429 return pcmcia_parse_tuple(handle, tuple, parse);
427} 430}
@@ -509,7 +512,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
509 req.Base = req.Size = 0; 512 req.Base = req.Size = 0;
510 req.AccessSpeed = 0; 513 req.AccessSpeed = 0;
511 i = pcmcia_request_window(&link, &req, &link->win); 514 i = pcmcia_request_window(&link, &req, &link->win);
512 if (i != CS_SUCCESS) 515 if (i != 0)
513 goto free_cfg_mem; 516 goto free_cfg_mem;
514 smc->base = ioremap(req.Base, req.Size); 517 smc->base = ioremap(req.Base, req.Size);
515 mem.CardOffset = mem.Page = 0; 518 mem.CardOffset = mem.Page = 0;
@@ -517,7 +520,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
517 mem.CardOffset = link->conf.ConfigBase; 520 mem.CardOffset = link->conf.ConfigBase;
518 i = pcmcia_map_mem_page(link->win, &mem); 521 i = pcmcia_map_mem_page(link->win, &mem);
519 522
520 if ((i == CS_SUCCESS) 523 if ((i == 0)
521 && (smc->manfid == MANFID_MEGAHERTZ) 524 && (smc->manfid == MANFID_MEGAHERTZ)
522 && (smc->cardid == PRODID_MEGAHERTZ_EM3288)) 525 && (smc->cardid == PRODID_MEGAHERTZ_EM3288))
523 mhz_3288_power(link); 526 mhz_3288_power(link);
@@ -551,12 +554,12 @@ static int mhz_setup(struct pcmcia_device *link)
551 /* Read the station address from the CIS. It is stored as the last 554 /* Read the station address from the CIS. It is stored as the last
552 (fourth) string in the Version 1 Version/ID tuple. */ 555 (fourth) string in the Version 1 Version/ID tuple. */
553 tuple->DesiredTuple = CISTPL_VERS_1; 556 tuple->DesiredTuple = CISTPL_VERS_1;
554 if (first_tuple(link, tuple, parse) != CS_SUCCESS) { 557 if (first_tuple(link, tuple, parse) != 0) {
555 rc = -1; 558 rc = -1;
556 goto free_cfg_mem; 559 goto free_cfg_mem;
557 } 560 }
558 /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */ 561 /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */
559 if (next_tuple(link, tuple, parse) != CS_SUCCESS) 562 if (next_tuple(link, tuple, parse) != 0)
560 first_tuple(link, tuple, parse); 563 first_tuple(link, tuple, parse);
561 if (parse->version_1.ns > 3) { 564 if (parse->version_1.ns > 3) {
562 station_addr = parse->version_1.str + parse->version_1.ofs[3]; 565 station_addr = parse->version_1.str + parse->version_1.ofs[3];
@@ -568,11 +571,11 @@ static int mhz_setup(struct pcmcia_device *link)
568 571
569 /* Another possibility: for the EM3288, in a special tuple */ 572 /* Another possibility: for the EM3288, in a special tuple */
570 tuple->DesiredTuple = 0x81; 573 tuple->DesiredTuple = 0x81;
571 if (pcmcia_get_first_tuple(link, tuple) != CS_SUCCESS) { 574 if (pcmcia_get_first_tuple(link, tuple) != 0) {
572 rc = -1; 575 rc = -1;
573 goto free_cfg_mem; 576 goto free_cfg_mem;
574 } 577 }
575 if (pcmcia_get_tuple_data(link, tuple) != CS_SUCCESS) { 578 if (pcmcia_get_tuple_data(link, tuple) != 0) {
576 rc = -1; 579 rc = -1;
577 goto free_cfg_mem; 580 goto free_cfg_mem;
578 } 581 }
@@ -700,12 +703,12 @@ static int smc_setup(struct pcmcia_device *link)
700 /* Check for a LAN function extension tuple */ 703 /* Check for a LAN function extension tuple */
701 tuple->DesiredTuple = CISTPL_FUNCE; 704 tuple->DesiredTuple = CISTPL_FUNCE;
702 i = first_tuple(link, tuple, parse); 705 i = first_tuple(link, tuple, parse);
703 while (i == CS_SUCCESS) { 706 while (i == 0) {
704 if (parse->funce.type == CISTPL_FUNCE_LAN_NODE_ID) 707 if (parse->funce.type == CISTPL_FUNCE_LAN_NODE_ID)
705 break; 708 break;
706 i = next_tuple(link, tuple, parse); 709 i = next_tuple(link, tuple, parse);
707 } 710 }
708 if (i == CS_SUCCESS) { 711 if (i == 0) {
709 node_id = (cistpl_lan_node_id_t *)parse->funce.data; 712 node_id = (cistpl_lan_node_id_t *)parse->funce.data;
710 if (node_id->nb == 6) { 713 if (node_id->nb == 6) {
711 for (i = 0; i < 6; i++) 714 for (i = 0; i < 6; i++)
@@ -752,9 +755,10 @@ static int osi_config(struct pcmcia_device *link)
752 for (i = j = 0; j < 4; j++) { 755 for (i = j = 0; j < 4; j++) {
753 link->io.BasePort2 = com[j]; 756 link->io.BasePort2 = com[j];
754 i = pcmcia_request_io(link, &link->io); 757 i = pcmcia_request_io(link, &link->io);
755 if (i == CS_SUCCESS) break; 758 if (i == 0)
759 break;
756 } 760 }
757 if (i != CS_SUCCESS) { 761 if (i != 0) {
758 /* Fallback: turn off hard decode */ 762 /* Fallback: turn off hard decode */
759 link->conf.ConfigIndex = 0x03; 763 link->conf.ConfigIndex = 0x03;
760 link->io.NumPorts2 = 0; 764 link->io.NumPorts2 = 0;
@@ -787,13 +791,13 @@ static int osi_setup(struct pcmcia_device *link, u_short manfid, u_short cardid)
787 /* Read the station address from tuple 0x90, subtuple 0x04 */ 791 /* Read the station address from tuple 0x90, subtuple 0x04 */
788 tuple->DesiredTuple = 0x90; 792 tuple->DesiredTuple = 0x90;
789 i = pcmcia_get_first_tuple(link, tuple); 793 i = pcmcia_get_first_tuple(link, tuple);
790 while (i == CS_SUCCESS) { 794 while (i == 0) {
791 i = pcmcia_get_tuple_data(link, tuple); 795 i = pcmcia_get_tuple_data(link, tuple);
792 if ((i != CS_SUCCESS) || (buf[0] == 0x04)) 796 if ((i != 0) || (buf[0] == 0x04))
793 break; 797 break;
794 i = pcmcia_get_next_tuple(link, tuple); 798 i = pcmcia_get_next_tuple(link, tuple);
795 } 799 }
796 if (i != CS_SUCCESS) { 800 if (i != 0) {
797 rc = -1; 801 rc = -1;
798 goto free_cfg_mem; 802 goto free_cfg_mem;
799 } 803 }
@@ -931,8 +935,11 @@ static int check_sig(struct pcmcia_device *link)
931 935
932======================================================================*/ 936======================================================================*/
933 937
934#define CS_EXIT_TEST(ret, svc, label) \ 938#define CS_EXIT_TEST(ret, svc, label) \
935if (ret != CS_SUCCESS) { cs_error(link, svc, ret); goto label; } 939if (ret != 0) { \
940 cs_error(link, svc, ret); \
941 goto label; \
942}
936 943
937static int smc91c92_config(struct pcmcia_device *link) 944static int smc91c92_config(struct pcmcia_device *link)
938{ 945{
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index b8aa16307f79..ab42fb6addf6 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -82,13 +82,13 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
82 tuple.TupleOffset = 0; 82 tuple.TupleOffset = 0;
83 83
84 res = pcmcia_get_first_tuple(dev, &tuple); 84 res = pcmcia_get_first_tuple(dev, &tuple);
85 if (res != CS_SUCCESS) 85 if (res != 0)
86 goto err_kfree_ssb; 86 goto err_kfree_ssb;
87 res = pcmcia_get_tuple_data(dev, &tuple); 87 res = pcmcia_get_tuple_data(dev, &tuple);
88 if (res != CS_SUCCESS) 88 if (res != 0)
89 goto err_kfree_ssb; 89 goto err_kfree_ssb;
90 res = pcmcia_parse_tuple(dev, &tuple, &parse); 90 res = pcmcia_parse_tuple(dev, &tuple, &parse);
91 if (res != CS_SUCCESS) 91 if (res != 0)
92 goto err_kfree_ssb; 92 goto err_kfree_ssb;
93 93
94 dev->conf.ConfigBase = parse.config.base; 94 dev->conf.ConfigBase = parse.config.base;
@@ -107,13 +107,13 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
107 win.Size = SSB_CORE_SIZE; 107 win.Size = SSB_CORE_SIZE;
108 win.AccessSpeed = 250; 108 win.AccessSpeed = 250;
109 res = pcmcia_request_window(&dev, &win, &dev->win); 109 res = pcmcia_request_window(&dev, &win, &dev->win);
110 if (res != CS_SUCCESS) 110 if (res != 0)
111 goto err_kfree_ssb; 111 goto err_kfree_ssb;
112 112
113 mem.CardOffset = 0; 113 mem.CardOffset = 0;
114 mem.Page = 0; 114 mem.Page = 0;
115 res = pcmcia_map_mem_page(dev->win, &mem); 115 res = pcmcia_map_mem_page(dev->win, &mem);
116 if (res != CS_SUCCESS) 116 if (res != 0)
117 goto err_disable; 117 goto err_disable;
118 118
119 dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; 119 dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
@@ -121,11 +121,11 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
121 dev->irq.Handler = NULL; /* The handler is registered later. */ 121 dev->irq.Handler = NULL; /* The handler is registered later. */
122 dev->irq.Instance = NULL; 122 dev->irq.Instance = NULL;
123 res = pcmcia_request_irq(dev, &dev->irq); 123 res = pcmcia_request_irq(dev, &dev->irq);
124 if (res != CS_SUCCESS) 124 if (res != 0)
125 goto err_disable; 125 goto err_disable;
126 126
127 res = pcmcia_request_configuration(dev, &dev->conf); 127 res = pcmcia_request_configuration(dev, &dev->conf);
128 if (res != CS_SUCCESS) 128 if (res != 0)
129 goto err_disable; 129 goto err_disable;
130 130
131 err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); 131 err = ssb_bus_pcmciabus_register(ssb, dev, win.Base);
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index c768d42d5177..2826e674a8e7 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -234,7 +234,7 @@ static void sandisk_set_iobase(local_info_t *local)
234 reg.Value = hw_priv->link->io.BasePort1 & 0x00ff; 234 reg.Value = hw_priv->link->io.BasePort1 & 0x00ff;
235 res = pcmcia_access_configuration_register(hw_priv->link, 235 res = pcmcia_access_configuration_register(hw_priv->link,
236 &reg); 236 &reg);
237 if (res != CS_SUCCESS) { 237 if (res != 0) {
238 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" 238 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
239 " res=%d\n", res); 239 " res=%d\n", res);
240 } 240 }
@@ -246,7 +246,7 @@ static void sandisk_set_iobase(local_info_t *local)
246 reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8; 246 reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8;
247 res = pcmcia_access_configuration_register(hw_priv->link, 247 res = pcmcia_access_configuration_register(hw_priv->link,
248 &reg); 248 &reg);
249 if (res != CS_SUCCESS) { 249 if (res != 0) {
250 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" 250 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
251 " res=%d\n", res); 251 " res=%d\n", res);
252 } 252 }
@@ -322,7 +322,7 @@ static int sandisk_enable_wireless(struct net_device *dev)
322 reg.Value = COR_SOFT_RESET; 322 reg.Value = COR_SOFT_RESET;
323 res = pcmcia_access_configuration_register(hw_priv->link, 323 res = pcmcia_access_configuration_register(hw_priv->link,
324 &reg); 324 &reg);
325 if (res != CS_SUCCESS) { 325 if (res != 0) {
326 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", 326 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
327 dev->name, res); 327 dev->name, res);
328 goto done; 328 goto done;
@@ -339,7 +339,7 @@ static int sandisk_enable_wireless(struct net_device *dev)
339 reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA; 339 reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA;
340 res = pcmcia_access_configuration_register(hw_priv->link, 340 res = pcmcia_access_configuration_register(hw_priv->link,
341 &reg); 341 &reg);
342 if (res != CS_SUCCESS) { 342 if (res != 0) {
343 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", 343 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
344 dev->name, res); 344 dev->name, res);
345 goto done; 345 goto done;
@@ -374,7 +374,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
374 reg.Value = 0; 374 reg.Value = 0;
375 res = pcmcia_access_configuration_register(hw_priv->link, 375 res = pcmcia_access_configuration_register(hw_priv->link,
376 &reg); 376 &reg);
377 if (res != CS_SUCCESS) { 377 if (res != 0) {
378 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n", 378 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n",
379 res); 379 res);
380 return; 380 return;
@@ -386,7 +386,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
386 reg.Value |= COR_SOFT_RESET; 386 reg.Value |= COR_SOFT_RESET;
387 res = pcmcia_access_configuration_register(hw_priv->link, 387 res = pcmcia_access_configuration_register(hw_priv->link,
388 &reg); 388 &reg);
389 if (res != CS_SUCCESS) { 389 if (res != 0) {
390 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n", 390 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n",
391 res); 391 res);
392 return; 392 return;
@@ -399,7 +399,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
399 reg.Value |= COR_IREQ_ENA; 399 reg.Value |= COR_IREQ_ENA;
400 res = pcmcia_access_configuration_register(hw_priv->link, 400 res = pcmcia_access_configuration_register(hw_priv->link,
401 &reg); 401 &reg);
402 if (res != CS_SUCCESS) { 402 if (res != 0) {
403 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n", 403 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n",
404 res); 404 res);
405 return; 405 return;
@@ -433,7 +433,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
433 reg.Value = 0; 433 reg.Value = 0;
434 res = pcmcia_access_configuration_register(hw_priv->link, 434 res = pcmcia_access_configuration_register(hw_priv->link,
435 &reg); 435 &reg);
436 if (res != CS_SUCCESS) { 436 if (res != 0) {
437 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 " 437 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 "
438 "(%d)\n", res); 438 "(%d)\n", res);
439 return; 439 return;
@@ -446,7 +446,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
446 reg.Value |= COR_SOFT_RESET; 446 reg.Value |= COR_SOFT_RESET;
447 res = pcmcia_access_configuration_register(hw_priv->link, 447 res = pcmcia_access_configuration_register(hw_priv->link,
448 &reg); 448 &reg);
449 if (res != CS_SUCCESS) { 449 if (res != 0) {
450 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 " 450 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 "
451 "(%d)\n", res); 451 "(%d)\n", res);
452 return; 452 return;
@@ -460,7 +460,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
460 reg.Offset = CISREG_CCSR; 460 reg.Offset = CISREG_CCSR;
461 res = pcmcia_access_configuration_register(hw_priv->link, 461 res = pcmcia_access_configuration_register(hw_priv->link,
462 &reg); 462 &reg);
463 if (res != CS_SUCCESS) { 463 if (res != 0) {
464 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 " 464 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 "
465 "(%d)\n", res); 465 "(%d)\n", res);
466 return; 466 return;
@@ -472,7 +472,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
472 reg.Value = old_cor & ~COR_SOFT_RESET; 472 reg.Value = old_cor & ~COR_SOFT_RESET;
473 res = pcmcia_access_configuration_register(hw_priv->link, 473 res = pcmcia_access_configuration_register(hw_priv->link,
474 &reg); 474 &reg);
475 if (res != CS_SUCCESS) { 475 if (res != 0) {
476 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 " 476 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 "
477 "(%d)\n", res); 477 "(%d)\n", res);
478 return; 478 return;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index f479c1af6782..bf2dd1057928 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -749,9 +749,10 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
749 for (i = j = 0x0; j < 0x400; j += 0x20) { 749 for (i = j = 0x0; j < 0x400; j += 0x20) {
750 link->io.BasePort1 = j ^ 0x300; 750 link->io.BasePort1 = j ^ 0x300;
751 i = pcmcia_request_io(link, &link->io); 751 i = pcmcia_request_io(link, &link->io);
752 if (i == CS_SUCCESS) break; 752 if (i == 0)
753 break;
753 } 754 }
754 if (i != CS_SUCCESS) { 755 if (i != 0) {
755 cs_error(link, RequestIO, i); 756 cs_error(link, RequestIO, i);
756 goto failed; 757 goto failed;
757 } 758 }
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 963960dc30f2..99c7c8bc2573 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -798,9 +798,9 @@ static void ray_release(struct pcmcia_device *link)
798 iounmap(local->amem); 798 iounmap(local->amem);
799 /* Do bother checking to see if these succeed or not */ 799 /* Do bother checking to see if these succeed or not */
800 i = pcmcia_release_window(local->amem_handle); 800 i = pcmcia_release_window(local->amem_handle);
801 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i); 801 if ( i != 0 ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i);
802 i = pcmcia_release_window(local->rmem_handle); 802 i = pcmcia_release_window(local->rmem_handle);
803 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i); 803 if ( i != 0 ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i);
804 pcmcia_disable_device(link); 804 pcmcia_disable_device(link);
805 805
806 DEBUG(2,"ray_release ending\n"); 806 DEBUG(2,"ray_release ending\n");
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index b584c0ecc62d..fee9a0250534 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3708,7 +3708,7 @@ wv_pcmcia_reset(struct net_device * dev)
3708#endif 3708#endif
3709 3709
3710 i = pcmcia_access_configuration_register(link, &reg); 3710 i = pcmcia_access_configuration_register(link, &reg);
3711 if(i != CS_SUCCESS) 3711 if (i != 0)
3712 { 3712 {
3713 cs_error(link, AccessConfigurationRegister, i); 3713 cs_error(link, AccessConfigurationRegister, i);
3714 return FALSE; 3714 return FALSE;
@@ -3722,7 +3722,7 @@ wv_pcmcia_reset(struct net_device * dev)
3722 reg.Action = CS_WRITE; 3722 reg.Action = CS_WRITE;
3723 reg.Value = reg.Value | COR_SW_RESET; 3723 reg.Value = reg.Value | COR_SW_RESET;
3724 i = pcmcia_access_configuration_register(link, &reg); 3724 i = pcmcia_access_configuration_register(link, &reg);
3725 if(i != CS_SUCCESS) 3725 if (i != 0)
3726 { 3726 {
3727 cs_error(link, AccessConfigurationRegister, i); 3727 cs_error(link, AccessConfigurationRegister, i);
3728 return FALSE; 3728 return FALSE;
@@ -3731,7 +3731,7 @@ wv_pcmcia_reset(struct net_device * dev)
3731 reg.Action = CS_WRITE; 3731 reg.Action = CS_WRITE;
3732 reg.Value = COR_LEVEL_IRQ | COR_CONFIG; 3732 reg.Value = COR_LEVEL_IRQ | COR_CONFIG;
3733 i = pcmcia_access_configuration_register(link, &reg); 3733 i = pcmcia_access_configuration_register(link, &reg);
3734 if(i != CS_SUCCESS) 3734 if (i != 0)
3735 { 3735 {
3736 cs_error(link, AccessConfigurationRegister, i); 3736 cs_error(link, AccessConfigurationRegister, i);
3737 return FALSE; 3737 return FALSE;
@@ -3909,7 +3909,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3909 do 3909 do
3910 { 3910 {
3911 i = pcmcia_request_io(link, &link->io); 3911 i = pcmcia_request_io(link, &link->io);
3912 if(i != CS_SUCCESS) 3912 if (i != 0)
3913 { 3913 {
3914 cs_error(link, RequestIO, i); 3914 cs_error(link, RequestIO, i);
3915 break; 3915 break;
@@ -3920,7 +3920,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3920 * actually assign a handler to the interrupt. 3920 * actually assign a handler to the interrupt.
3921 */ 3921 */
3922 i = pcmcia_request_irq(link, &link->irq); 3922 i = pcmcia_request_irq(link, &link->irq);
3923 if(i != CS_SUCCESS) 3923 if (i != 0)
3924 { 3924 {
3925 cs_error(link, RequestIRQ, i); 3925 cs_error(link, RequestIRQ, i);
3926 break; 3926 break;
@@ -3932,7 +3932,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3932 */ 3932 */
3933 link->conf.ConfigIndex = 1; 3933 link->conf.ConfigIndex = 1;
3934 i = pcmcia_request_configuration(link, &link->conf); 3934 i = pcmcia_request_configuration(link, &link->conf);
3935 if(i != CS_SUCCESS) 3935 if (i != 0)
3936 { 3936 {
3937 cs_error(link, RequestConfiguration, i); 3937 cs_error(link, RequestConfiguration, i);
3938 break; 3938 break;
@@ -3948,7 +3948,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3948 req.Base = req.Size = 0; 3948 req.Base = req.Size = 0;
3949 req.AccessSpeed = mem_speed; 3949 req.AccessSpeed = mem_speed;
3950 i = pcmcia_request_window(&link, &req, &link->win); 3950 i = pcmcia_request_window(&link, &req, &link->win);
3951 if(i != CS_SUCCESS) 3951 if (i != 0)
3952 { 3952 {
3953 cs_error(link, RequestWindow, i); 3953 cs_error(link, RequestWindow, i);
3954 break; 3954 break;
@@ -3960,7 +3960,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3960 3960
3961 mem.CardOffset = 0; mem.Page = 0; 3961 mem.CardOffset = 0; mem.Page = 0;
3962 i = pcmcia_map_mem_page(link->win, &mem); 3962 i = pcmcia_map_mem_page(link->win, &mem);
3963 if(i != CS_SUCCESS) 3963 if (i != 0)
3964 { 3964 {
3965 cs_error(link, MapMemPage, i); 3965 cs_error(link, MapMemPage, i);
3966 break; 3966 break;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 377141995e36..969f53fd705b 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1977,10 +1977,10 @@ static int wl3501_config(struct pcmcia_device *link)
1977 link->io.BasePort1 = j; 1977 link->io.BasePort1 = j;
1978 link->io.BasePort2 = link->io.BasePort1 + 0x10; 1978 link->io.BasePort2 = link->io.BasePort1 + 0x10;
1979 i = pcmcia_request_io(link, &link->io); 1979 i = pcmcia_request_io(link, &link->io);
1980 if (i == CS_SUCCESS) 1980 if (i == 0)
1981 break; 1981 break;
1982 } 1982 }
1983 if (i != CS_SUCCESS) { 1983 if (i != 0) {
1984 cs_error(link, RequestIO, i); 1984 cs_error(link, RequestIO, i);
1985 goto failed; 1985 goto failed;
1986 } 1986 }
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
index 911ca0e8dfc2..db77e1f3309a 100644
--- a/drivers/pcmcia/cardbus.c
+++ b/drivers/pcmcia/cardbus.c
@@ -238,7 +238,7 @@ int __ref cb_alloc(struct pcmcia_socket * s)
238 pci_bus_add_devices(bus); 238 pci_bus_add_devices(bus);
239 239
240 s->irq.AssignedIRQ = s->pci_irq; 240 s->irq.AssignedIRQ = s->pci_irq;
241 return CS_SUCCESS; 241 return 0;
242} 242}
243 243
244void cb_free(struct pcmcia_socket * s) 244void cb_free(struct pcmcia_socket * s)
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index fe789e0e7ada..1a513d9a8612 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -392,7 +392,7 @@ int pcmcia_replace_cis(struct pcmcia_socket *s,
392 return CS_OUT_OF_RESOURCE; 392 return CS_OUT_OF_RESOURCE;
393 s->fake_cis_len = len; 393 s->fake_cis_len = len;
394 memcpy(s->fake_cis, data, len); 394 memcpy(s->fake_cis, data, len);
395 return CS_SUCCESS; 395 return 0;
396} 396}
397EXPORT_SYMBOL(pcmcia_replace_cis); 397EXPORT_SYMBOL(pcmcia_replace_cis);
398 398
@@ -441,9 +441,9 @@ int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple
441 !(tuple->Attributes & TUPLE_RETURN_COMMON)) { 441 !(tuple->Attributes & TUPLE_RETURN_COMMON)) {
442 cisdata_t req = tuple->DesiredTuple; 442 cisdata_t req = tuple->DesiredTuple;
443 tuple->DesiredTuple = CISTPL_LONGLINK_MFC; 443 tuple->DesiredTuple = CISTPL_LONGLINK_MFC;
444 if (pccard_get_next_tuple(s, function, tuple) == CS_SUCCESS) { 444 if (pccard_get_next_tuple(s, function, tuple) == 0) {
445 tuple->DesiredTuple = CISTPL_LINKTARGET; 445 tuple->DesiredTuple = CISTPL_LINKTARGET;
446 if (pccard_get_next_tuple(s, function, tuple) != CS_SUCCESS) 446 if (pccard_get_next_tuple(s, function, tuple) != 0)
447 return CS_NO_MORE_ITEMS; 447 return CS_NO_MORE_ITEMS;
448 } else 448 } else
449 tuple->CISOffset = tuple->TupleLink = 0; 449 tuple->CISOffset = tuple->TupleLink = 0;
@@ -584,7 +584,7 @@ int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int function, tuple_
584 tuple->TupleCode = link[0]; 584 tuple->TupleCode = link[0];
585 tuple->TupleLink = link[1]; 585 tuple->TupleLink = link[1];
586 tuple->CISOffset = ofs + 2; 586 tuple->CISOffset = ofs + 2;
587 return CS_SUCCESS; 587 return 0;
588} 588}
589EXPORT_SYMBOL(pccard_get_next_tuple); 589EXPORT_SYMBOL(pccard_get_next_tuple);
590 590
@@ -604,11 +604,11 @@ int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple)
604 len = tuple->TupleLink - tuple->TupleOffset; 604 len = tuple->TupleLink - tuple->TupleOffset;
605 tuple->TupleDataLen = tuple->TupleLink; 605 tuple->TupleDataLen = tuple->TupleLink;
606 if (len == 0) 606 if (len == 0)
607 return CS_SUCCESS; 607 return 0;
608 read_cis_cache(s, SPACE(tuple->Flags), 608 read_cis_cache(s, SPACE(tuple->Flags),
609 tuple->CISOffset + tuple->TupleOffset, 609 tuple->CISOffset + tuple->TupleOffset,
610 _MIN(len, tuple->TupleDataMax), tuple->TupleData); 610 _MIN(len, tuple->TupleDataMax), tuple->TupleData);
611 return CS_SUCCESS; 611 return 0;
612} 612}
613EXPORT_SYMBOL(pccard_get_tuple_data); 613EXPORT_SYMBOL(pccard_get_tuple_data);
614 614
@@ -659,7 +659,7 @@ static int parse_device(tuple_t *tuple, cistpl_device_t *device)
659 if (++p == q) break; 659 if (++p == q) break;
660 } 660 }
661 661
662 return CS_SUCCESS; 662 return 0;
663} 663}
664 664
665/*====================================================================*/ 665/*====================================================================*/
@@ -673,7 +673,7 @@ static int parse_checksum(tuple_t *tuple, cistpl_checksum_t *csum)
673 csum->addr = tuple->CISOffset + get_unaligned_le16(p) - 2; 673 csum->addr = tuple->CISOffset + get_unaligned_le16(p) - 2;
674 csum->len = get_unaligned_le16(p + 2); 674 csum->len = get_unaligned_le16(p + 2);
675 csum->sum = *(p + 4); 675 csum->sum = *(p + 4);
676 return CS_SUCCESS; 676 return 0;
677} 677}
678 678
679/*====================================================================*/ 679/*====================================================================*/
@@ -683,7 +683,7 @@ static int parse_longlink(tuple_t *tuple, cistpl_longlink_t *link)
683 if (tuple->TupleDataLen < 4) 683 if (tuple->TupleDataLen < 4)
684 return CS_BAD_TUPLE; 684 return CS_BAD_TUPLE;
685 link->addr = get_unaligned_le32(tuple->TupleData); 685 link->addr = get_unaligned_le32(tuple->TupleData);
686 return CS_SUCCESS; 686 return 0;
687} 687}
688 688
689/*====================================================================*/ 689/*====================================================================*/
@@ -704,7 +704,7 @@ static int parse_longlink_mfc(tuple_t *tuple,
704 link->fn[i].addr = get_unaligned_le32(p); 704 link->fn[i].addr = get_unaligned_le32(p);
705 p += 4; 705 p += 4;
706 } 706 }
707 return CS_SUCCESS; 707 return 0;
708} 708}
709 709
710/*====================================================================*/ 710/*====================================================================*/
@@ -729,9 +729,9 @@ static int parse_strings(u_char *p, u_char *q, int max,
729 } 729 }
730 if (found) { 730 if (found) {
731 *found = ns; 731 *found = ns;
732 return CS_SUCCESS; 732 return 0;
733 } else { 733 } else {
734 return (ns == max) ? CS_SUCCESS : CS_BAD_TUPLE; 734 return (ns == max) ? 0 : CS_BAD_TUPLE;
735 } 735 }
736} 736}
737 737
@@ -782,7 +782,7 @@ static int parse_jedec(tuple_t *tuple, cistpl_jedec_t *jedec)
782 p += 2; 782 p += 2;
783 } 783 }
784 jedec->nid = nid; 784 jedec->nid = nid;
785 return CS_SUCCESS; 785 return 0;
786} 786}
787 787
788/*====================================================================*/ 788/*====================================================================*/
@@ -793,7 +793,7 @@ static int parse_manfid(tuple_t *tuple, cistpl_manfid_t *m)
793 return CS_BAD_TUPLE; 793 return CS_BAD_TUPLE;
794 m->manf = get_unaligned_le16(tuple->TupleData); 794 m->manf = get_unaligned_le16(tuple->TupleData);
795 m->card = get_unaligned_le16(tuple->TupleData + 2); 795 m->card = get_unaligned_le16(tuple->TupleData + 2);
796 return CS_SUCCESS; 796 return 0;
797} 797}
798 798
799/*====================================================================*/ 799/*====================================================================*/
@@ -806,7 +806,7 @@ static int parse_funcid(tuple_t *tuple, cistpl_funcid_t *f)
806 p = (u_char *)tuple->TupleData; 806 p = (u_char *)tuple->TupleData;
807 f->func = p[0]; 807 f->func = p[0];
808 f->sysinit = p[1]; 808 f->sysinit = p[1];
809 return CS_SUCCESS; 809 return 0;
810} 810}
811 811
812/*====================================================================*/ 812/*====================================================================*/
@@ -821,7 +821,7 @@ static int parse_funce(tuple_t *tuple, cistpl_funce_t *f)
821 f->type = p[0]; 821 f->type = p[0];
822 for (i = 1; i < tuple->TupleDataLen; i++) 822 for (i = 1; i < tuple->TupleDataLen; i++)
823 f->data[i-1] = p[i]; 823 f->data[i-1] = p[i];
824 return CS_SUCCESS; 824 return 0;
825} 825}
826 826
827/*====================================================================*/ 827/*====================================================================*/
@@ -847,7 +847,7 @@ static int parse_config(tuple_t *tuple, cistpl_config_t *config)
847 for (i = 0; i <= rmsz; i++) 847 for (i = 0; i <= rmsz; i++)
848 config->rmask[i>>2] += p[i] << (8*(i%4)); 848 config->rmask[i>>2] += p[i] << (8*(i%4));
849 config->subtuples = tuple->TupleDataLen - (rasz+rmsz+4); 849 config->subtuples = tuple->TupleDataLen - (rasz+rmsz+4);
850 return CS_SUCCESS; 850 return 0;
851} 851}
852 852
853/*====================================================================== 853/*======================================================================
@@ -1122,7 +1122,7 @@ static int parse_cftable_entry(tuple_t *tuple,
1122 1122
1123 entry->subtuples = q-p; 1123 entry->subtuples = q-p;
1124 1124
1125 return CS_SUCCESS; 1125 return 0;
1126} 1126}
1127 1127
1128/*====================================================================*/ 1128/*====================================================================*/
@@ -1138,7 +1138,7 @@ static int parse_bar(tuple_t *tuple, cistpl_bar_t *bar)
1138 bar->attr = *p; 1138 bar->attr = *p;
1139 p += 2; 1139 p += 2;
1140 bar->size = get_unaligned_le32(p); 1140 bar->size = get_unaligned_le32(p);
1141 return CS_SUCCESS; 1141 return 0;
1142} 1142}
1143 1143
1144static int parse_config_cb(tuple_t *tuple, cistpl_config_t *config) 1144static int parse_config_cb(tuple_t *tuple, cistpl_config_t *config)
@@ -1152,7 +1152,7 @@ static int parse_config_cb(tuple_t *tuple, cistpl_config_t *config)
1152 p++; 1152 p++;
1153 config->base = get_unaligned_le32(p); 1153 config->base = get_unaligned_le32(p);
1154 config->subtuples = tuple->TupleDataLen - 6; 1154 config->subtuples = tuple->TupleDataLen - 6;
1155 return CS_SUCCESS; 1155 return 0;
1156} 1156}
1157 1157
1158static int parse_cftable_entry_cb(tuple_t *tuple, 1158static int parse_cftable_entry_cb(tuple_t *tuple,
@@ -1223,7 +1223,7 @@ static int parse_cftable_entry_cb(tuple_t *tuple,
1223 1223
1224 entry->subtuples = q-p; 1224 entry->subtuples = q-p;
1225 1225
1226 return CS_SUCCESS; 1226 return 0;
1227} 1227}
1228 1228
1229#endif 1229#endif
@@ -1249,7 +1249,7 @@ static int parse_device_geo(tuple_t *tuple, cistpl_device_geo_t *geo)
1249 p += 6; 1249 p += 6;
1250 } 1250 }
1251 geo->ngeo = n; 1251 geo->ngeo = n;
1252 return CS_SUCCESS; 1252 return 0;
1253} 1253}
1254 1254
1255/*====================================================================*/ 1255/*====================================================================*/
@@ -1291,7 +1291,7 @@ static int parse_org(tuple_t *tuple, cistpl_org_t *org)
1291 if (*p == '\0') break; 1291 if (*p == '\0') break;
1292 if (++p == q) return CS_BAD_TUPLE; 1292 if (++p == q) return CS_BAD_TUPLE;
1293 } 1293 }
1294 return CS_SUCCESS; 1294 return 0;
1295} 1295}
1296 1296
1297/*====================================================================*/ 1297/*====================================================================*/
@@ -1310,14 +1310,14 @@ static int parse_format(tuple_t *tuple, cistpl_format_t *fmt)
1310 fmt->offset = get_unaligned_le32(p + 2); 1310 fmt->offset = get_unaligned_le32(p + 2);
1311 fmt->length = get_unaligned_le32(p + 6); 1311 fmt->length = get_unaligned_le32(p + 6);
1312 1312
1313 return CS_SUCCESS; 1313 return 0;
1314} 1314}
1315 1315
1316/*====================================================================*/ 1316/*====================================================================*/
1317 1317
1318int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse) 1318int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse)
1319{ 1319{
1320 int ret = CS_SUCCESS; 1320 int ret = 0;
1321 1321
1322 if (tuple->TupleDataLen > tuple->TupleDataMax) 1322 if (tuple->TupleDataLen > tuple->TupleDataMax)
1323 return CS_BAD_TUPLE; 1323 return CS_BAD_TUPLE;
@@ -1388,7 +1388,7 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse)
1388 break; 1388 break;
1389 case CISTPL_NO_LINK: 1389 case CISTPL_NO_LINK:
1390 case CISTPL_LINKTARGET: 1390 case CISTPL_LINKTARGET:
1391 ret = CS_SUCCESS; 1391 ret = 0;
1392 break; 1392 break;
1393 default: 1393 default:
1394 ret = CS_UNSUPPORTED_FUNCTION; 1394 ret = CS_UNSUPPORTED_FUNCTION;
@@ -1416,12 +1416,14 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t
1416 tuple.DesiredTuple = code; 1416 tuple.DesiredTuple = code;
1417 tuple.Attributes = TUPLE_RETURN_COMMON; 1417 tuple.Attributes = TUPLE_RETURN_COMMON;
1418 ret = pccard_get_first_tuple(s, function, &tuple); 1418 ret = pccard_get_first_tuple(s, function, &tuple);
1419 if (ret != CS_SUCCESS) goto done; 1419 if (ret != 0)
1420 goto done;
1420 tuple.TupleData = buf; 1421 tuple.TupleData = buf;
1421 tuple.TupleOffset = 0; 1422 tuple.TupleOffset = 0;
1422 tuple.TupleDataMax = 255; 1423 tuple.TupleDataMax = 255;
1423 ret = pccard_get_tuple_data(s, &tuple); 1424 ret = pccard_get_tuple_data(s, &tuple);
1424 if (ret != CS_SUCCESS) goto done; 1425 if (ret != 0)
1426 goto done;
1425 ret = pccard_parse_tuple(&tuple, parse); 1427 ret = pccard_parse_tuple(&tuple, parse);
1426done: 1428done:
1427 kfree(buf); 1429 kfree(buf);
@@ -1462,21 +1464,21 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned
1462 tuple->DesiredTuple = RETURN_FIRST_TUPLE; 1464 tuple->DesiredTuple = RETURN_FIRST_TUPLE;
1463 tuple->Attributes = TUPLE_RETURN_COMMON; 1465 tuple->Attributes = TUPLE_RETURN_COMMON;
1464 ret = pccard_get_first_tuple(s, function, tuple); 1466 ret = pccard_get_first_tuple(s, function, tuple);
1465 if (ret != CS_SUCCESS) 1467 if (ret != 0)
1466 goto done; 1468 goto done;
1467 1469
1468 /* First tuple should be DEVICE; we should really have either that 1470 /* First tuple should be DEVICE; we should really have either that
1469 or a CFTABLE_ENTRY of some sort */ 1471 or a CFTABLE_ENTRY of some sort */
1470 if ((tuple->TupleCode == CISTPL_DEVICE) || 1472 if ((tuple->TupleCode == CISTPL_DEVICE) ||
1471 (pccard_read_tuple(s, function, CISTPL_CFTABLE_ENTRY, p) == CS_SUCCESS) || 1473 (pccard_read_tuple(s, function, CISTPL_CFTABLE_ENTRY, p) == 0) ||
1472 (pccard_read_tuple(s, function, CISTPL_CFTABLE_ENTRY_CB, p) == CS_SUCCESS)) 1474 (pccard_read_tuple(s, function, CISTPL_CFTABLE_ENTRY_CB, p) == 0))
1473 dev_ok++; 1475 dev_ok++;
1474 1476
1475 /* All cards should have a MANFID tuple, and/or a VERS_1 or VERS_2 1477 /* All cards should have a MANFID tuple, and/or a VERS_1 or VERS_2
1476 tuple, for card identification. Certain old D-Link and Linksys 1478 tuple, for card identification. Certain old D-Link and Linksys
1477 cards have only a broken VERS_2 tuple; hence the bogus test. */ 1479 cards have only a broken VERS_2 tuple; hence the bogus test. */
1478 if ((pccard_read_tuple(s, function, CISTPL_MANFID, p) == CS_SUCCESS) || 1480 if ((pccard_read_tuple(s, function, CISTPL_MANFID, p) == 0) ||
1479 (pccard_read_tuple(s, function, CISTPL_VERS_1, p) == CS_SUCCESS) || 1481 (pccard_read_tuple(s, function, CISTPL_VERS_1, p) == 0) ||
1480 (pccard_read_tuple(s, function, CISTPL_VERS_2, p) != CS_NO_MORE_ITEMS)) 1482 (pccard_read_tuple(s, function, CISTPL_VERS_2, p) != CS_NO_MORE_ITEMS))
1481 ident_ok++; 1483 ident_ok++;
1482 1484
@@ -1485,7 +1487,8 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned
1485 1487
1486 for (count = 1; count < MAX_TUPLES; count++) { 1488 for (count = 1; count < MAX_TUPLES; count++) {
1487 ret = pccard_get_next_tuple(s, function, tuple); 1489 ret = pccard_get_next_tuple(s, function, tuple);
1488 if (ret != CS_SUCCESS) break; 1490 if (ret != 0)
1491 break;
1489 if (((tuple->TupleCode > 0x23) && (tuple->TupleCode < 0x40)) || 1492 if (((tuple->TupleCode > 0x23) && (tuple->TupleCode < 0x40)) ||
1490 ((tuple->TupleCode > 0x47) && (tuple->TupleCode < 0x80)) || 1493 ((tuple->TupleCode > 0x47) && (tuple->TupleCode < 0x80)) ||
1491 ((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff))) 1494 ((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff)))
@@ -1500,6 +1503,6 @@ done:
1500 *info = count; 1503 *info = count;
1501 kfree(tuple); 1504 kfree(tuple);
1502 kfree(p); 1505 kfree(p);
1503 return CS_SUCCESS; 1506 return 0;
1504} 1507}
1505EXPORT_SYMBOL(pccard_validate_cis); 1508EXPORT_SYMBOL(pccard_validate_cis);
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index ccdbbe4936fd..037cb0c7e094 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -370,7 +370,7 @@ static int socket_reset(struct pcmcia_socket *skt)
370 return CS_NO_CARD; 370 return CS_NO_CARD;
371 371
372 if (status & SS_READY) 372 if (status & SS_READY)
373 return CS_SUCCESS; 373 return 0;
374 374
375 msleep(unreset_check * 10); 375 msleep(unreset_check * 10);
376 } 376 }
@@ -507,7 +507,7 @@ static int socket_insert(struct pcmcia_socket *skt)
507 return CS_NO_CARD; 507 return CS_NO_CARD;
508 508
509 ret = socket_setup(skt, setup_delay); 509 ret = socket_setup(skt, setup_delay);
510 if (ret == CS_SUCCESS) { 510 if (ret == 0) {
511 skt->state |= SOCKET_PRESENT; 511 skt->state |= SOCKET_PRESENT;
512 512
513 dev_printk(KERN_NOTICE, &skt->dev, 513 dev_printk(KERN_NOTICE, &skt->dev,
@@ -543,7 +543,7 @@ static int socket_suspend(struct pcmcia_socket *skt)
543 skt->ops->suspend(skt); 543 skt->ops->suspend(skt);
544 skt->state |= SOCKET_SUSPEND; 544 skt->state |= SOCKET_SUSPEND;
545 545
546 return CS_SUCCESS; 546 return 0;
547} 547}
548 548
549/* 549/*
@@ -568,7 +568,7 @@ static int socket_resume(struct pcmcia_socket *skt)
568 } 568 }
569 569
570 ret = socket_setup(skt, resume_delay); 570 ret = socket_setup(skt, resume_delay);
571 if (ret == CS_SUCCESS) { 571 if (ret == 0) {
572 /* 572 /*
573 * FIXME: need a better check here for cardbus cards. 573 * FIXME: need a better check here for cardbus cards.
574 */ 574 */
@@ -593,7 +593,7 @@ static int socket_resume(struct pcmcia_socket *skt)
593 593
594 skt->state &= ~SOCKET_SUSPEND; 594 skt->state &= ~SOCKET_SUSPEND;
595 595
596 return CS_SUCCESS; 596 return 0;
597} 597}
598 598
599static void socket_remove(struct pcmcia_socket *skt) 599static void socket_remove(struct pcmcia_socket *skt)
@@ -778,14 +778,14 @@ int pccard_reset_card(struct pcmcia_socket *skt)
778 send_event(skt, CS_EVENT_RESET_PHYSICAL, CS_EVENT_PRI_LOW); 778 send_event(skt, CS_EVENT_RESET_PHYSICAL, CS_EVENT_PRI_LOW);
779 if (skt->callback) 779 if (skt->callback)
780 skt->callback->suspend(skt); 780 skt->callback->suspend(skt);
781 if (socket_reset(skt) == CS_SUCCESS) { 781 if (socket_reset(skt) == 0) {
782 send_event(skt, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW); 782 send_event(skt, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW);
783 if (skt->callback) 783 if (skt->callback)
784 skt->callback->resume(skt); 784 skt->callback->resume(skt);
785 } 785 }
786 } 786 }
787 787
788 ret = CS_SUCCESS; 788 ret = 0;
789 } while (0); 789 } while (0);
790 mutex_unlock(&skt->skt_mutex); 790 mutex_unlock(&skt->skt_mutex);
791 791
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index a393501554ac..20bef0c12c14 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -187,7 +187,7 @@ static int pcmcia_report_error(struct pcmcia_device *p_dev, error_info_t *err)
187 else 187 else
188 printk("%s: Unknown error code %#x\n", serv, err->retcode); 188 printk("%s: Unknown error code %#x\n", serv, err->retcode);
189 189
190 return CS_SUCCESS; 190 return 0;
191} /* report_error */ 191} /* report_error */
192 192
193/* end of code which was in cs.c before */ 193/* end of code which was in cs.c before */
diff --git a/drivers/pcmcia/ds_internal.h b/drivers/pcmcia/ds_internal.h
index 3a2b25e6ed73..14bc55aa1426 100644
--- a/drivers/pcmcia/ds_internal.h
+++ b/drivers/pcmcia/ds_internal.h
@@ -18,6 +18,12 @@ extern int handle_request(struct pcmcia_socket *s, event_t event);
18#else 18#else
19static inline void __init pcmcia_setup_ioctl(void) { return; } 19static inline void __init pcmcia_setup_ioctl(void) { return; }
20static inline void __exit pcmcia_cleanup_ioctl(void) { return; } 20static inline void __exit pcmcia_cleanup_ioctl(void) { return; }
21static inline void handle_event(struct pcmcia_socket *s, event_t event) { return; } 21static inline void handle_event(struct pcmcia_socket *s, event_t event)
22static inline int handle_request(struct pcmcia_socket *s, event_t event) { return CS_SUCCESS; } 22{
23 return;
24}
25static inline int handle_request(struct pcmcia_socket *s, event_t event)
26{
27 return 0;
28}
23#endif 29#endif
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 53dadc111002..ef64ceb5e751 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -167,7 +167,7 @@ static int adjust_irq(struct pcmcia_socket *s, adjust_t *adj)
167#else 167#else
168 168
169static inline int adjust_irq(struct pcmcia_socket *s, adjust_t *adj) { 169static inline int adjust_irq(struct pcmcia_socket *s, adjust_t *adj) {
170 return CS_SUCCESS; 170 return 0;
171} 171}
172 172
173#endif 173#endif
@@ -274,7 +274,7 @@ static int pccard_get_status(struct pcmcia_socket *s,
274 status->CardState |= 274 status->CardState |=
275 (reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0; 275 (reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0;
276 } 276 }
277 return CS_SUCCESS; 277 return 0;
278 } 278 }
279 status->CardState |= 279 status->CardState |=
280 (val & SS_WRPROT) ? CS_EVENT_WRITE_PROTECT : 0; 280 (val & SS_WRPROT) ? CS_EVENT_WRITE_PROTECT : 0;
@@ -284,7 +284,7 @@ static int pccard_get_status(struct pcmcia_socket *s,
284 (val & SS_BATWARN) ? CS_EVENT_BATTERY_LOW : 0; 284 (val & SS_BATWARN) ? CS_EVENT_BATTERY_LOW : 0;
285 status->CardState |= 285 status->CardState |=
286 (val & SS_READY) ? CS_EVENT_READY_CHANGE : 0; 286 (val & SS_READY) ? CS_EVENT_READY_CHANGE : 0;
287 return CS_SUCCESS; 287 return 0;
288} /* pccard_get_status */ 288} /* pccard_get_status */
289 289
290int pccard_get_configuration_info(struct pcmcia_socket *s, 290int pccard_get_configuration_info(struct pcmcia_socket *s,
@@ -315,7 +315,7 @@ int pccard_get_configuration_info(struct pcmcia_socket *s,
315 config->BasePort1 + 1; 315 config->BasePort1 + 1;
316 } 316 }
317 } 317 }
318 return CS_SUCCESS; 318 return 0;
319 } 319 }
320#endif 320#endif
321 321
@@ -331,7 +331,7 @@ int pccard_get_configuration_info(struct pcmcia_socket *s,
331 config->Attributes = 0; 331 config->Attributes = 0;
332 config->Vcc = s->socket.Vcc; 332 config->Vcc = s->socket.Vcc;
333 config->Vpp1 = config->Vpp2 = s->socket.Vpp; 333 config->Vpp1 = config->Vpp2 = s->socket.Vpp;
334 return CS_SUCCESS; 334 return 0;
335 } 335 }
336 336
337 config->Attributes = c->Attributes | CONF_VALID_CLIENT; 337 config->Attributes = c->Attributes | CONF_VALID_CLIENT;
@@ -355,7 +355,7 @@ int pccard_get_configuration_info(struct pcmcia_socket *s,
355 config->Attributes2 = c->io.Attributes2; 355 config->Attributes2 = c->io.Attributes2;
356 config->IOAddrLines = c->io.IOAddrLines; 356 config->IOAddrLines = c->io.IOAddrLines;
357 357
358 return CS_SUCCESS; 358 return 0;
359} /* pccard_get_configuration_info */ 359} /* pccard_get_configuration_info */
360 360
361 361
@@ -961,7 +961,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
961 err = -EINVAL; 961 err = -EINVAL;
962 } 962 }
963 963
964 if ((err == 0) && (ret != CS_SUCCESS)) { 964 if ((err == 0) && (ret != 0)) {
965 ds_dbg(2, "ds_ioctl: ret = %d\n", ret); 965 ds_dbg(2, "ds_ioctl: ret = %d\n", ret);
966 switch (ret) { 966 switch (ret) {
967 case CS_BAD_SOCKET: case CS_NO_CARD: 967 case CS_BAD_SOCKET: case CS_NO_CARD:
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index c5a2b005091c..48e168e8165b 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -192,7 +192,7 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev,
192 return CS_BAD_ARGS; 192 return CS_BAD_ARGS;
193 break; 193 break;
194 } 194 }
195 return CS_SUCCESS; 195 return 0;
196} /* pcmcia_access_configuration_register */ 196} /* pcmcia_access_configuration_register */
197EXPORT_SYMBOL(pcmcia_access_configuration_register); 197EXPORT_SYMBOL(pcmcia_access_configuration_register);
198 198
@@ -226,7 +226,7 @@ int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle,
226 if (win->ctl.flags & MAP_USE_WAIT) 226 if (win->ctl.flags & MAP_USE_WAIT)
227 req->Attributes |= WIN_USE_WAIT; 227 req->Attributes |= WIN_USE_WAIT;
228 *handle = win; 228 *handle = win;
229 return CS_SUCCESS; 229 return 0;
230} /* pcmcia_get_window */ 230} /* pcmcia_get_window */
231EXPORT_SYMBOL(pcmcia_get_window); 231EXPORT_SYMBOL(pcmcia_get_window);
232 232
@@ -241,7 +241,7 @@ int pcmcia_get_mem_page(window_handle_t win, memreq_t *req)
241 return CS_BAD_HANDLE; 241 return CS_BAD_HANDLE;
242 req->Page = 0; 242 req->Page = 0;
243 req->CardOffset = win->ctl.card_start; 243 req->CardOffset = win->ctl.card_start;
244 return CS_SUCCESS; 244 return 0;
245} /* pcmcia_get_mem_page */ 245} /* pcmcia_get_mem_page */
246EXPORT_SYMBOL(pcmcia_get_mem_page); 246EXPORT_SYMBOL(pcmcia_get_mem_page);
247 247
@@ -257,7 +257,7 @@ int pcmcia_map_mem_page(window_handle_t win, memreq_t *req)
257 win->ctl.card_start = req->CardOffset; 257 win->ctl.card_start = req->CardOffset;
258 if (s->ops->set_mem_map(s, &win->ctl) != 0) 258 if (s->ops->set_mem_map(s, &win->ctl) != 0)
259 return CS_BAD_OFFSET; 259 return CS_BAD_OFFSET;
260 return CS_SUCCESS; 260 return 0;
261} /* pcmcia_map_mem_page */ 261} /* pcmcia_map_mem_page */
262EXPORT_SYMBOL(pcmcia_map_mem_page); 262EXPORT_SYMBOL(pcmcia_map_mem_page);
263 263
@@ -328,7 +328,7 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
328 } 328 }
329 } 329 }
330 330
331 return CS_SUCCESS; 331 return 0;
332} /* modify_configuration */ 332} /* modify_configuration */
333EXPORT_SYMBOL(pcmcia_modify_configuration); 333EXPORT_SYMBOL(pcmcia_modify_configuration);
334 334
@@ -363,7 +363,7 @@ int pcmcia_release_configuration(struct pcmcia_device *p_dev)
363 } 363 }
364 } 364 }
365 365
366 return CS_SUCCESS; 366 return 0;
367} /* pcmcia_release_configuration */ 367} /* pcmcia_release_configuration */
368 368
369 369
@@ -397,7 +397,7 @@ static int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req)
397 if (req->NumPorts2) 397 if (req->NumPorts2)
398 release_io_space(s, req->BasePort2, req->NumPorts2); 398 release_io_space(s, req->BasePort2, req->NumPorts2);
399 399
400 return CS_SUCCESS; 400 return 0;
401} /* pcmcia_release_io */ 401} /* pcmcia_release_io */
402 402
403 403
@@ -429,7 +429,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
429 pcmcia_used_irq[req->AssignedIRQ]--; 429 pcmcia_used_irq[req->AssignedIRQ]--;
430#endif 430#endif
431 431
432 return CS_SUCCESS; 432 return 0;
433} /* pcmcia_release_irq */ 433} /* pcmcia_release_irq */
434 434
435 435
@@ -458,7 +458,7 @@ int pcmcia_release_window(window_handle_t win)
458 458
459 win->magic = 0; 459 win->magic = 0;
460 460
461 return CS_SUCCESS; 461 return 0;
462} /* pcmcia_release_window */ 462} /* pcmcia_release_window */
463EXPORT_SYMBOL(pcmcia_release_window); 463EXPORT_SYMBOL(pcmcia_release_window);
464 464
@@ -573,7 +573,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
573 573
574 c->state |= CONFIG_LOCKED; 574 c->state |= CONFIG_LOCKED;
575 p_dev->_locked = 1; 575 p_dev->_locked = 1;
576 return CS_SUCCESS; 576 return 0;
577} /* pcmcia_request_configuration */ 577} /* pcmcia_request_configuration */
578EXPORT_SYMBOL(pcmcia_request_configuration); 578EXPORT_SYMBOL(pcmcia_request_configuration);
579 579
@@ -619,7 +619,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
619 c->io = *req; 619 c->io = *req;
620 c->state |= CONFIG_IO_REQ; 620 c->state |= CONFIG_IO_REQ;
621 p_dev->_io = 1; 621 p_dev->_io = 1;
622 return CS_SUCCESS; 622 return 0;
623} /* pcmcia_request_io */ 623} /* pcmcia_request_io */
624EXPORT_SYMBOL(pcmcia_request_io); 624EXPORT_SYMBOL(pcmcia_request_io);
625 625
@@ -740,7 +740,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
740 pcmcia_used_irq[irq]++; 740 pcmcia_used_irq[irq]++;
741#endif 741#endif
742 742
743 return CS_SUCCESS; 743 return 0;
744} /* pcmcia_request_irq */ 744} /* pcmcia_request_irq */
745EXPORT_SYMBOL(pcmcia_request_irq); 745EXPORT_SYMBOL(pcmcia_request_irq);
746 746
@@ -821,7 +821,7 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
821 } 821 }
822 *wh = win; 822 *wh = win;
823 823
824 return CS_SUCCESS; 824 return 0;
825} /* pcmcia_request_window */ 825} /* pcmcia_request_window */
826EXPORT_SYMBOL(pcmcia_request_window); 826EXPORT_SYMBOL(pcmcia_request_window);
827 827
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 00aacbe731dc..9d04fb214ec2 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -134,7 +134,7 @@ static int add_interval(struct resource_map *map, u_long base, u_long num)
134 if (!q) return CS_OUT_OF_RESOURCE; 134 if (!q) return CS_OUT_OF_RESOURCE;
135 q->base = base; q->num = num; 135 q->base = base; q->num = num;
136 q->next = p->next; p->next = q; 136 q->next = p->next; p->next = q;
137 return CS_SUCCESS; 137 return 0;
138} 138}
139 139
140/*====================================================================*/ 140/*====================================================================*/
@@ -174,7 +174,7 @@ static int sub_interval(struct resource_map *map, u_long base, u_long num)
174 } 174 }
175 } 175 }
176 } 176 }
177 return CS_SUCCESS; 177 return 0;
178} 178}
179 179
180/*====================================================================== 180/*======================================================================
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 344e570fbb6f..ea7e3c0e02d9 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -431,10 +431,10 @@ first_tuple(struct pcmcia_device *handle, tuple_t * tuple, cisparse_t * parse)
431{ 431{
432 int i; 432 int i;
433 i = pcmcia_get_first_tuple(handle, tuple); 433 i = pcmcia_get_first_tuple(handle, tuple);
434 if (i != CS_SUCCESS) 434 if (i != 0)
435 return CS_NO_MORE_ITEMS; 435 return CS_NO_MORE_ITEMS;
436 i = pcmcia_get_tuple_data(handle, tuple); 436 i = pcmcia_get_tuple_data(handle, tuple);
437 if (i != CS_SUCCESS) 437 if (i != 0)
438 return i; 438 return i;
439 return pcmcia_parse_tuple(handle, tuple, parse); 439 return pcmcia_parse_tuple(handle, tuple, parse);
440} 440}
@@ -527,7 +527,7 @@ static int simple_config(struct pcmcia_device *link)
527 527
528found_port: 528found_port:
529 i = pcmcia_request_irq(link, &link->irq); 529 i = pcmcia_request_irq(link, &link->irq);
530 if (i != CS_SUCCESS) { 530 if (i != 0) {
531 cs_error(link, RequestIRQ, i); 531 cs_error(link, RequestIRQ, i);
532 link->irq.AssignedIRQ = 0; 532 link->irq.AssignedIRQ = 0;
533 } 533 }
@@ -541,7 +541,7 @@ found_port:
541 info->quirk->config(link); 541 info->quirk->config(link);
542 542
543 i = pcmcia_request_configuration(link, &link->conf); 543 i = pcmcia_request_configuration(link, &link->conf);
544 if (i != CS_SUCCESS) { 544 if (i != 0) {
545 cs_error(link, RequestConfiguration, i); 545 cs_error(link, RequestConfiguration, i);
546 return -1; 546 return -1;
547 } 547 }
@@ -609,7 +609,7 @@ static int multi_config(struct pcmcia_device *link)
609 } 609 }
610 610
611 i = pcmcia_request_irq(link, &link->irq); 611 i = pcmcia_request_irq(link, &link->irq);
612 if (i != CS_SUCCESS) { 612 if (i != 0) {
613 /* FIXME: comment does not fit, error handling does not fit */ 613 /* FIXME: comment does not fit, error handling does not fit */
614 printk(KERN_NOTICE 614 printk(KERN_NOTICE
615 "serial_cs: no usable port range found, giving up\n"); 615 "serial_cs: no usable port range found, giving up\n");
@@ -624,7 +624,7 @@ static int multi_config(struct pcmcia_device *link)
624 info->quirk->config(link); 624 info->quirk->config(link);
625 625
626 i = pcmcia_request_configuration(link, &link->conf); 626 i = pcmcia_request_configuration(link, &link->conf);
627 if (i != CS_SUCCESS) { 627 if (i != 0) {
628 cs_error(link, RequestConfiguration, i); 628 cs_error(link, RequestConfiguration, i);
629 return -ENODEV; 629 return -ENODEV;
630 } 630 }
@@ -702,7 +702,7 @@ static int serial_config(struct pcmcia_device * link)
702 /* Is this a compliant multifunction card? */ 702 /* Is this a compliant multifunction card? */
703 tuple->DesiredTuple = CISTPL_LONGLINK_MFC; 703 tuple->DesiredTuple = CISTPL_LONGLINK_MFC;
704 tuple->Attributes = TUPLE_RETURN_COMMON | TUPLE_RETURN_LINK; 704 tuple->Attributes = TUPLE_RETURN_COMMON | TUPLE_RETURN_LINK;
705 info->multi = (first_tuple(link, tuple, parse) == CS_SUCCESS); 705 info->multi = (first_tuple(link, tuple, parse) == 0);
706 706
707 /* Is this a multiport card? */ 707 /* Is this a multiport card? */
708 tuple->DesiredTuple = CISTPL_MANFID; 708 tuple->DesiredTuple = CISTPL_MANFID;
@@ -726,7 +726,7 @@ static int serial_config(struct pcmcia_device * link)
726 ((link->func_id == CISTPL_FUNCID_MULTI) || 726 ((link->func_id == CISTPL_FUNCID_MULTI) ||
727 (link->func_id == CISTPL_FUNCID_SERIAL))) { 727 (link->func_id == CISTPL_FUNCID_SERIAL))) {
728 tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY; 728 tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY;
729 if (first_tuple(link, tuple, parse) == CS_SUCCESS) { 729 if (first_tuple(link, tuple, parse) == 0) {
730 if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0)) 730 if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0))
731 info->multi = cf->io.win[0].len >> 3; 731 info->multi = cf->io.win[0].len >> 3;
732 if ((cf->io.nwin == 2) && (cf->io.win[0].len == 8) && 732 if ((cf->io.nwin == 2) && (cf->io.win[0].len == 8) &&
diff --git a/drivers/ssb/pcmcia.c b/drivers/ssb/pcmcia.c
index 24c2a46c1476..96993080c7d1 100644
--- a/drivers/ssb/pcmcia.c
+++ b/drivers/ssb/pcmcia.c
@@ -80,7 +80,7 @@ static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value)
80 reg.Action = CS_WRITE; 80 reg.Action = CS_WRITE;
81 reg.Value = value; 81 reg.Value = value;
82 res = pcmcia_access_configuration_register(bus->host_pcmcia, &reg); 82 res = pcmcia_access_configuration_register(bus->host_pcmcia, &reg);
83 if (unlikely(res != CS_SUCCESS)) 83 if (unlikely(res != 0))
84 return -EBUSY; 84 return -EBUSY;
85 85
86 return 0; 86 return 0;
@@ -96,7 +96,7 @@ static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value)
96 reg.Offset = offset; 96 reg.Offset = offset;
97 reg.Action = CS_READ; 97 reg.Action = CS_READ;
98 res = pcmcia_access_configuration_register(bus->host_pcmcia, &reg); 98 res = pcmcia_access_configuration_register(bus->host_pcmcia, &reg);
99 if (unlikely(res != CS_SUCCESS)) 99 if (unlikely(res != 0))
100 return -EBUSY; 100 return -EBUSY;
101 *value = reg.Value; 101 *value = reg.Value;
102 102
@@ -638,17 +638,17 @@ int ssb_pcmcia_get_invariants(struct ssb_bus *bus,
638 tuple.TupleData = buf; 638 tuple.TupleData = buf;
639 tuple.TupleDataMax = sizeof(buf); 639 tuple.TupleDataMax = sizeof(buf);
640 res = pcmcia_get_first_tuple(bus->host_pcmcia, &tuple); 640 res = pcmcia_get_first_tuple(bus->host_pcmcia, &tuple);
641 GOTO_ERROR_ON(res != CS_SUCCESS, "MAC first tpl"); 641 GOTO_ERROR_ON(res != 0, "MAC first tpl");
642 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple); 642 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple);
643 GOTO_ERROR_ON(res != CS_SUCCESS, "MAC first tpl data"); 643 GOTO_ERROR_ON(res != 0, "MAC first tpl data");
644 while (1) { 644 while (1) {
645 GOTO_ERROR_ON(tuple.TupleDataLen < 1, "MAC tpl < 1"); 645 GOTO_ERROR_ON(tuple.TupleDataLen < 1, "MAC tpl < 1");
646 if (tuple.TupleData[0] == CISTPL_FUNCE_LAN_NODE_ID) 646 if (tuple.TupleData[0] == CISTPL_FUNCE_LAN_NODE_ID)
647 break; 647 break;
648 res = pcmcia_get_next_tuple(bus->host_pcmcia, &tuple); 648 res = pcmcia_get_next_tuple(bus->host_pcmcia, &tuple);
649 GOTO_ERROR_ON(res != CS_SUCCESS, "MAC next tpl"); 649 GOTO_ERROR_ON(res != 0, "MAC next tpl");
650 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple); 650 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple);
651 GOTO_ERROR_ON(res != CS_SUCCESS, "MAC next tpl data"); 651 GOTO_ERROR_ON(res != 0, "MAC next tpl data");
652 } 652 }
653 GOTO_ERROR_ON(tuple.TupleDataLen != ETH_ALEN + 2, "MAC tpl size"); 653 GOTO_ERROR_ON(tuple.TupleDataLen != ETH_ALEN + 2, "MAC tpl size");
654 memcpy(sprom->il0mac, &tuple.TupleData[2], ETH_ALEN); 654 memcpy(sprom->il0mac, &tuple.TupleData[2], ETH_ALEN);
@@ -659,9 +659,9 @@ int ssb_pcmcia_get_invariants(struct ssb_bus *bus,
659 tuple.TupleData = buf; 659 tuple.TupleData = buf;
660 tuple.TupleDataMax = sizeof(buf); 660 tuple.TupleDataMax = sizeof(buf);
661 res = pcmcia_get_first_tuple(bus->host_pcmcia, &tuple); 661 res = pcmcia_get_first_tuple(bus->host_pcmcia, &tuple);
662 GOTO_ERROR_ON(res != CS_SUCCESS, "VEN first tpl"); 662 GOTO_ERROR_ON(res != 0, "VEN first tpl");
663 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple); 663 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple);
664 GOTO_ERROR_ON(res != CS_SUCCESS, "VEN first tpl data"); 664 GOTO_ERROR_ON(res != 0, "VEN first tpl data");
665 while (1) { 665 while (1) {
666 GOTO_ERROR_ON(tuple.TupleDataLen < 1, "VEN tpl < 1"); 666 GOTO_ERROR_ON(tuple.TupleDataLen < 1, "VEN tpl < 1");
667 switch (tuple.TupleData[0]) { 667 switch (tuple.TupleData[0]) {
@@ -735,9 +735,9 @@ int ssb_pcmcia_get_invariants(struct ssb_bus *bus,
735 res = pcmcia_get_next_tuple(bus->host_pcmcia, &tuple); 735 res = pcmcia_get_next_tuple(bus->host_pcmcia, &tuple);
736 if (res == CS_NO_MORE_ITEMS) 736 if (res == CS_NO_MORE_ITEMS)
737 break; 737 break;
738 GOTO_ERROR_ON(res != CS_SUCCESS, "VEN next tpl"); 738 GOTO_ERROR_ON(res != 0, "VEN next tpl");
739 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple); 739 res = pcmcia_get_tuple_data(bus->host_pcmcia, &tuple);
740 GOTO_ERROR_ON(res != CS_SUCCESS, "VEN next tpl data"); 740 GOTO_ERROR_ON(res != 0, "VEN next tpl data");
741 } 741 }
742 742
743 return 0; 743 return 0;