diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-06-04 12:06:13 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-12-04 20:09:21 -0500 |
commit | a9606fd39083478bef313c0e3b77bc065e39e36e (patch) | |
tree | d9ee62f811e557671fad5cecf669f93300b6c57a /drivers/net/pcmcia/smc91c92_cs.c | |
parent | efd50585e2ff9bd60e044fda7764d323010a7fe4 (diff) |
[PATCH] pcmcia: remove prod_id indirection
As we read out the product information strings (VERS_1) from the PCMCIA device
in the PCMCIA core, and device drivers can access those reliably in struct
pcmcia_device's fields prod_id[], remove additional product information string
detection logic from PCMCIA device drivers.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia/smc91c92_cs.c')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index ae024bfc1ae4..bf408482443e 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -560,16 +560,8 @@ static int mhz_setup(struct pcmcia_device *link) | |||
560 | 560 | ||
561 | /* Read the station address from the CIS. It is stored as the last | 561 | /* Read the station address from the CIS. It is stored as the last |
562 | (fourth) string in the Version 1 Version/ID tuple. */ | 562 | (fourth) string in the Version 1 Version/ID tuple. */ |
563 | tuple->DesiredTuple = CISTPL_VERS_1; | 563 | if (link->prod_id[3]) { |
564 | if (first_tuple(link, tuple, parse) != CS_SUCCESS) { | 564 | station_addr = link->prod_id[3]; |
565 | rc = -1; | ||
566 | goto free_cfg_mem; | ||
567 | } | ||
568 | /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */ | ||
569 | if (next_tuple(link, tuple, parse) != CS_SUCCESS) | ||
570 | first_tuple(link, tuple, parse); | ||
571 | if (parse->version_1.ns > 3) { | ||
572 | station_addr = parse->version_1.str + parse->version_1.ofs[3]; | ||
573 | if (cvt_ascii_address(dev, station_addr) == 0) { | 565 | if (cvt_ascii_address(dev, station_addr) == 0) { |
574 | rc = 0; | 566 | rc = 0; |
575 | goto free_cfg_mem; | 567 | goto free_cfg_mem; |
@@ -744,15 +736,12 @@ static int smc_setup(struct pcmcia_device *link) | |||
744 | } | 736 | } |
745 | } | 737 | } |
746 | /* Try the third string in the Version 1 Version/ID tuple. */ | 738 | /* Try the third string in the Version 1 Version/ID tuple. */ |
747 | tuple->DesiredTuple = CISTPL_VERS_1; | 739 | if (link->prod_id[2]) { |
748 | if (first_tuple(link, tuple, parse) != CS_SUCCESS) { | 740 | station_addr = link->prod_id[2]; |
749 | rc = -1; | 741 | if (cvt_ascii_address(dev, station_addr) == 0) { |
750 | goto free_cfg_mem; | 742 | rc = 0; |
751 | } | 743 | goto free_cfg_mem; |
752 | station_addr = parse->version_1.str + parse->version_1.ofs[2]; | 744 | } |
753 | if (cvt_ascii_address(dev, station_addr) == 0) { | ||
754 | rc = 0; | ||
755 | goto free_cfg_mem; | ||
756 | } | 745 | } |
757 | 746 | ||
758 | rc = -1; | 747 | rc = -1; |