]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/serial_cs.c
[S390] don't call handle_mm_fault() if in an atomic context.
[linux-2.6-omap-h63xx.git] / drivers / serial / serial_cs.c
index 783b0c5f8870872cc8f004e8d7b7b2cf283a2bfa..431433f4dd6d3983a02bb8be5c2b09cd983e8c51 100644 (file)
@@ -723,7 +723,7 @@ static int serial_config(struct pcmcia_device * link)
        u_char *buf;
        cisparse_t *parse;
        cistpl_cftable_entry_t *cf;
-       int i, last_ret, last_fn;
+       int i;
 
        DEBUG(0, "serial_config(0x%p)\n", link);
 
@@ -740,15 +740,6 @@ static int serial_config(struct pcmcia_device * link)
        tuple->TupleOffset = 0;
        tuple->TupleDataMax = 255;
        tuple->Attributes = 0;
-       /* Get configuration register information */
-       tuple->DesiredTuple = CISTPL_CONFIG;
-       last_ret = first_tuple(link, tuple, parse);
-       if (last_ret != CS_SUCCESS) {
-               last_fn = ParseTuple;
-               goto cs_failed;
-       }
-       link->conf.ConfigBase = parse->config.base;
-       link->conf.Present = parse->config.rmask[0];
 
        /* Is this a compliant multifunction card? */
        tuple->DesiredTuple = CISTPL_LONGLINK_MFC;
@@ -757,27 +748,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))
@@ -814,8 +803,6 @@ static int serial_config(struct pcmcia_device * link)
        kfree(cfg_mem);
        return 0;
 
- cs_failed:
-       cs_error(link, last_fn, last_ret);
  failed:
        serial_remove(link);
        kfree(cfg_mem);