aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_cs.c
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/serial_cs.c
parent44e5e33e99e1b955ac6f0bb26abd9380629b48a9 (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/serial/serial_cs.c')
-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 783b0c5f8870..7aa2820e35bd 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)
757 757
758 /* Is this a multiport card? */ 758 /* Is this a multiport card? */
759 tuple->DesiredTuple = CISTPL_MANFID; 759 tuple->DesiredTuple = CISTPL_MANFID;
760 if (first_tuple(link, tuple, parse) == CS_SUCCESS) { 760 info->manfid = link->manf_id;
761 info->manfid = parse->manfid.manf; 761 info->prodid = link->card_id;
762 info->prodid = parse->manfid.card; 762
763 763 for (i = 0; i < ARRAY_SIZE(quirks); i++)
764 for (i = 0; i < ARRAY_SIZE(quirks); i++) 764 if ((quirks[i].manfid == ~0 ||
765 if ((quirks[i].manfid == ~0 || 765 quirks[i].manfid == info->manfid) &&
766 quirks[i].manfid == info->manfid) && 766 (quirks[i].prodid == ~0 ||
767 (quirks[i].prodid == ~0 || 767 quirks[i].prodid == info->prodid)) {
768 quirks[i].prodid == info->prodid)) { 768 info->quirk = &quirks[i];
769 info->quirk = &quirks[i]; 769 break;
770 break; 770 }
771 }
772 }
773 771
774 /* Another check for dual-serial cards: look for either serial or 772 /* Another check for dual-serial cards: look for either serial or
775 multifunction cards that ask for appropriate IO port ranges */ 773 multifunction cards that ask for appropriate IO port ranges */
776 tuple->DesiredTuple = CISTPL_FUNCID; 774 tuple->DesiredTuple = CISTPL_FUNCID;
777 if ((info->multi == 0) && 775 if ((info->multi == 0) &&
778 ((first_tuple(link, tuple, parse) != CS_SUCCESS) || 776 (link->has_func_id) &&
779 (parse->funcid.func == CISTPL_FUNCID_MULTI) || 777 ((link->func_id == CISTPL_FUNCID_MULTI) ||
780 (parse->funcid.func == CISTPL_FUNCID_SERIAL))) { 778 (link->func_id == CISTPL_FUNCID_SERIAL))) {
781 tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY; 779 tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY;
782 if (first_tuple(link, tuple, parse) == CS_SUCCESS) { 780 if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
783 if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0)) 781 if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0))