From 12d28181bdfec74d78fb5cbfe74f9a2d7c28e948 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Mon, 28 Apr 2008 16:33:57 -0600 Subject: [PATCH] --- yaml --- r: 95551 b: refs/heads/master c: 068076d5517009654376ceda75ff44af0feb9b1d h: refs/heads/master i: 95549: 6b6c4401481e709834e5bedbc2995edca533b3f0 95547: 6692d8a3e6a551fdd7cccce0b3ed9ec1687bbf60 95543: d8fec87644d96f0167ef713f58a5b2ab6bd9b7c7 95535: d1f2cf8b3f86b49d7b485acd725c130601eaa484 95519: a5edd2f9c0db0a9320fa13581f81739dcede4d6b 95487: d7a08f017e93b7233e770cdf202b69d4721d1c26 v: v3 --- [refs] | 2 +- trunk/drivers/pnp/isapnp/core.c | 28 ++++++---------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/[refs] b/[refs] index 42ca469148bb..285e43bf1a92 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e436675f2a09ea389c1844507658f304924a2eca +refs/heads/master: 068076d5517009654376ceda75ff44af0feb9b1d diff --git a/trunk/drivers/pnp/isapnp/core.c b/trunk/drivers/pnp/isapnp/core.c index 1949c18a7365..3a326f9305f6 100644 --- a/trunk/drivers/pnp/isapnp/core.c +++ b/trunk/drivers/pnp/isapnp/core.c @@ -816,26 +816,6 @@ static unsigned char __init isapnp_checksum(unsigned char *data) return checksum; } -/* - * Parse EISA id for ISA PnP card. - */ -static void isapnp_parse_card_id(struct pnp_card *card, unsigned short vendor, - unsigned short device) -{ - char id[8]; - - id[0] = 'A' + ((vendor >> 2) & 0x3f) - 1; - id[1] = 'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1; - id[2] = 'A' + ((vendor >> 8) & 0x1f) - 1; - id[3] = hex_asc((device >> 4) & 0x0f); - id[4] = hex_asc(device & 0x0f); - id[5] = hex_asc((device >> 12) & 0x0f); - id[6] = hex_asc((device >> 8) & 0x0f); - id[7] = '\0'; - - pnp_add_card_id(card, id); -} - /* * Build device list for all present ISA PnP devices. */ @@ -844,6 +824,8 @@ static int __init isapnp_build_device_list(void) int csn; unsigned char header[9], checksum; struct pnp_card *card; + u32 eisa_id; + char id[8]; isapnp_wait(); isapnp_key(); @@ -864,8 +846,10 @@ static int __init isapnp_build_device_list(void) card->number = csn; INIT_LIST_HEAD(&card->devices); - isapnp_parse_card_id(card, (header[1] << 8) | header[0], - (header[3] << 8) | header[2]); + eisa_id = header[0] | header[1] << 8 | + header[2] << 16 | header[3] << 24; + pnp_eisa_id_to_string(eisa_id, id); + pnp_add_card_id(card, id); card->serial = (header[7] << 24) | (header[6] << 16) | (header[5] << 8) | header[4];