summaryrefslogtreecommitdiffstats
path: root/drivers/telephony/ixj_pcmcia.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-06-04 18:06:13 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2006-12-04 20:09:21 -0500
commita9606fd39083478bef313c0e3b77bc065e39e36e (patch)
treed9ee62f811e557671fad5cecf669f93300b6c57a /drivers/telephony/ixj_pcmcia.c
parentefd50585e2ff9bd60e044fda7764d323010a7fe4 (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/telephony/ixj_pcmcia.c')
-rw-r--r--drivers/telephony/ixj_pcmcia.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c
index dda0ca45d90..3f88978d5ae 100644
--- a/drivers/telephony/ixj_pcmcia.c
+++ b/drivers/telephony/ixj_pcmcia.c
@@ -69,25 +69,21 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static void ixj_get_serial(struct pcmcia_device * link, IXJ * j)
{
- tuple_t tuple;
- u_short buf[128];
char *str;
- int last_ret, last_fn, i, place;
+ int i, place;
DEBUG(0, "ixj_get_serial(0x%p)\n", link);
- tuple.TupleData = (cisdata_t *) buf;
- tuple.TupleOffset = 0;
- tuple.TupleDataMax = 80;
- tuple.Attributes = 0;
- tuple.DesiredTuple = CISTPL_VERS_1;
- CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
- CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
- str = (char *) buf;
- printk("PCMCIA Version %d.%d\n", str[0], str[1]);
- str += 2;
+
+ str = link->prod_id[0];
+ if (!str)
+ goto cs_failed;
printk("%s", str);
- str = str + strlen(str) + 1;
+ str = link->prod_id[1];
+ if (!str)
+ goto cs_failed;
printk(" %s", str);
- str = str + strlen(str) + 1;
+ str = link->prod_id[2];
+ if (!str)
+ goto cs_failed;
place = 1;
for (i = strlen(str) - 1; i >= 0; i--) {
switch (str[i]) {
@@ -122,7 +118,9 @@ static void ixj_get_serial(struct pcmcia_device * link, IXJ * j)
}
place = place * 0x10;
}
- str = str + strlen(str) + 1;
+ str = link->prod_id[3];
+ if (!str)
+ goto cs_failed;
printk(" version %s\n", str);
cs_failed:
return;