diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-06-04 18:06:13 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-12-05 02:09:21 +0100 |
commit | a9606fd39083478bef313c0e3b77bc065e39e36e (patch) | |
tree | d9ee62f811e557671fad5cecf669f93300b6c57a /drivers/net/pcmcia/xirc2ps_cs.c | |
parent | [PATCH] pcmcia: remove manf_id and card_id indirection (diff) | |
download | linux-a9606fd39083478bef313c0e3b77bc065e39e36e.tar.xz linux-a9606fd39083478bef313c0e3b77bc065e39e36e.zip |
[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/xirc2ps_cs.c')
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index f3914f58d67f..d6273619686a 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c @@ -707,22 +707,11 @@ set_card_type(struct pcmcia_device *link, const void *s) * Returns: true if this is a CE2 */ static int -has_ce2_string(struct pcmcia_device * link) +has_ce2_string(struct pcmcia_device * p_dev) { - tuple_t tuple; - cisparse_t parse; - u_char buf[256]; - - tuple.Attributes = 0; - tuple.TupleData = buf; - tuple.TupleDataMax = 254; - tuple.TupleOffset = 0; - tuple.DesiredTuple = CISTPL_VERS_1; - if (!first_tuple(link, &tuple, &parse) && parse.version_1.ns > 2) { - if (strstr(parse.version_1.str + parse.version_1.ofs[2], "CE2")) - return 1; - } - return 0; + if (p_dev->prod_id[2] && strstr(p_dev->prod_id[2], "CE2")) + return 1; + return 0; } /**************** |