diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-25 21:28:53 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-12-04 20:09:20 -0500 |
commit | efd50585e2ff9bd60e044fda7764d323010a7fe4 (patch) | |
tree | f43f8f10a3cfe6ceb1b5cede6581f79134ca0e63 /drivers/net/pcmcia/pcnet_cs.c | |
parent | 44e5e33e99e1b955ac6f0bb26abd9380629b48a9 (diff) |
[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/net/pcmcia/pcnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index c51cc5d8789a..430a41e7b686 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -519,7 +519,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
519 | tuple_t tuple; | 519 | tuple_t tuple; |
520 | cisparse_t parse; | 520 | cisparse_t parse; |
521 | int i, last_ret, last_fn, start_pg, stop_pg, cm_offset; | 521 | int i, last_ret, last_fn, start_pg, stop_pg, cm_offset; |
522 | int manfid = 0, prodid = 0, has_shmem = 0; | 522 | int has_shmem = 0; |
523 | u_short buf[64]; | 523 | u_short buf[64]; |
524 | hw_info_t *hw_info; | 524 | hw_info_t *hw_info; |
525 | 525 | ||
@@ -536,14 +536,6 @@ static int pcnet_config(struct pcmcia_device *link) | |||
536 | link->conf.ConfigBase = parse.config.base; | 536 | link->conf.ConfigBase = parse.config.base; |
537 | link->conf.Present = parse.config.rmask[0]; | 537 | link->conf.Present = parse.config.rmask[0]; |
538 | 538 | ||
539 | tuple.DesiredTuple = CISTPL_MANFID; | ||
540 | tuple.Attributes = TUPLE_RETURN_COMMON; | ||
541 | if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) && | ||
542 | (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) { | ||
543 | manfid = le16_to_cpu(buf[0]); | ||
544 | prodid = le16_to_cpu(buf[1]); | ||
545 | } | ||
546 | |||
547 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 539 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
548 | tuple.Attributes = 0; | 540 | tuple.Attributes = 0; |
549 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 541 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
@@ -589,8 +581,8 @@ static int pcnet_config(struct pcmcia_device *link) | |||
589 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 581 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
590 | link->conf.Status = CCSR_AUDIO_ENA; | 582 | link->conf.Status = CCSR_AUDIO_ENA; |
591 | } | 583 | } |
592 | if ((manfid == MANFID_IBM) && | 584 | if ((link->manf_id == MANFID_IBM) && |
593 | (prodid == PRODID_IBM_HOME_AND_AWAY)) | 585 | (link->card_id == PRODID_IBM_HOME_AND_AWAY)) |
594 | link->conf.ConfigIndex |= 0x10; | 586 | link->conf.ConfigIndex |= 0x10; |
595 | 587 | ||
596 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 588 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); |
@@ -624,10 +616,10 @@ static int pcnet_config(struct pcmcia_device *link) | |||
624 | info->flags = hw_info->flags; | 616 | info->flags = hw_info->flags; |
625 | /* Check for user overrides */ | 617 | /* Check for user overrides */ |
626 | info->flags |= (delay_output) ? DELAY_OUTPUT : 0; | 618 | info->flags |= (delay_output) ? DELAY_OUTPUT : 0; |
627 | if ((manfid == MANFID_SOCKET) && | 619 | if ((link->manf_id == MANFID_SOCKET) && |
628 | ((prodid == PRODID_SOCKET_LPE) || | 620 | ((link->card_id == PRODID_SOCKET_LPE) || |
629 | (prodid == PRODID_SOCKET_LPE_CF) || | 621 | (link->card_id == PRODID_SOCKET_LPE_CF) || |
630 | (prodid == PRODID_SOCKET_EIO))) | 622 | (link->card_id == PRODID_SOCKET_EIO))) |
631 | info->flags &= ~USE_BIG_BUF; | 623 | info->flags &= ~USE_BIG_BUF; |
632 | if (!use_big_buf) | 624 | if (!use_big_buf) |
633 | info->flags &= ~USE_BIG_BUF; | 625 | info->flags &= ~USE_BIG_BUF; |