aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/pcmciamtd.c
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 /drivers/mtd/maps/pcmciamtd.c
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>
Diffstat (limited to 'drivers/mtd/maps/pcmciamtd.c')
-rw-r--r--drivers/mtd/maps/pcmciamtd.c17
1 files changed, 8 insertions, 9 deletions
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);