[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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/****************
|
||||
|
Reference in New Issue
Block a user