summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-10-25 21:28:53 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2006-12-04 20:09:20 -0500
commitefd50585e2ff9bd60e044fda7764d323010a7fe4 (patch)
treef43f8f10a3cfe6ceb1b5cede6581f79134ca0e63 /drivers/serial
parent44e5e33e99e1b955ac6f0bb26abd9380629b48a9 (diff)
downloadop-kernel-dev-efd50585e2ff9bd60e044fda7764d323010a7fe4.zip
op-kernel-dev-efd50585e2ff9bd60e044fda7764d323010a7fe4.tar.gz
[PATCH] pcmcia: remove manf_id and card_id indirection
As we read out the manufactor and card_id from the PCMCIA device in the PCMCIA core, and device drivers can access those reliably in struct pcmcia_device's fields manf_id and card_id, remove additional (and partly broken) manf_id and card_id detection logic from PCMCIA device drivers. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_cs.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 783b0c5..7aa2820 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -757,27 +757,25 @@ static int serial_config(struct pcmcia_device * link)
/* Is this a multiport card? */
tuple->DesiredTuple = CISTPL_MANFID;
- if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
- info->manfid = parse->manfid.manf;
- info->prodid = parse->manfid.card;
-
- for (i = 0; i < ARRAY_SIZE(quirks); i++)
- if ((quirks[i].manfid == ~0 ||
- quirks[i].manfid == info->manfid) &&
- (quirks[i].prodid == ~0 ||
- quirks[i].prodid == info->prodid)) {
- info->quirk = &quirks[i];
- break;
- }
- }
+ info->manfid = link->manf_id;
+ info->prodid = link->card_id;
+
+ for (i = 0; i < ARRAY_SIZE(quirks); i++)
+ if ((quirks[i].manfid == ~0 ||
+ quirks[i].manfid == info->manfid) &&
+ (quirks[i].prodid == ~0 ||
+ quirks[i].prodid == info->prodid)) {
+ info->quirk = &quirks[i];
+ break;
+ }
/* Another check for dual-serial cards: look for either serial or
multifunction cards that ask for appropriate IO port ranges */
tuple->DesiredTuple = CISTPL_FUNCID;
if ((info->multi == 0) &&
- ((first_tuple(link, tuple, parse) != CS_SUCCESS) ||
- (parse->funcid.func == CISTPL_FUNCID_MULTI) ||
- (parse->funcid.func == CISTPL_FUNCID_SERIAL))) {
+ (link->has_func_id) &&
+ ((link->func_id == CISTPL_FUNCID_MULTI) ||
+ (link->func_id == CISTPL_FUNCID_SERIAL))) {
tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY;
if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0))
OpenPOWER on IntegriCloud