diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 04:07:45 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:26 -0400 |
commit | 4c89e88bfde6a3c179790e21004f24e09a058290 (patch) | |
tree | 2895a308d64aeabb5fde776d92572a51444d835b /drivers/ssb/pcmcia.c | |
parent | 1a53088c101789bfca431de709ff6e45e8c77003 (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/ssb/pcmcia.c')
-rw-r--r-- | drivers/ssb/pcmcia.c | 20 |
1 files changed, 10 insertions, 10 deletions
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, ®); | 82 | res = pcmcia_access_configuration_register(bus->host_pcmcia, ®); |
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, ®); | 98 | res = pcmcia_access_configuration_register(bus->host_pcmcia, ®); |
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; |