]> err.no Git - linux-2.6/commitdiff
pcmcia: fix cisinfo_t removal
authorMarc Zyngier <maz@misterjones.org>
Tue, 15 Jul 2008 13:26:15 +0000 (15:26 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Tue, 15 Jul 2008 18:53:06 +0000 (20:53 +0200)
The cisinfo_t removal patch (c5081d5f4775b2a3f858f91151bbf9163e473075
pcmcia: simplify pccard_validate_cis ) introduced a bug that prevented
card detection, for the (info->Chains == MAX_TUPLES) check was replaced
by (count), which is always true. Restoring the comparison to MAX_TUPLES
makes everybody happy...

[linux@dominikbrodowski.net: update changelog comment]
Signed-off-by: Marc Zyngier <marc.zyngier@altran.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/cistpl.c

index 9fcff0c336193e3fa4d5ccfc465e5766514cd4cc..65129b54eb09c309ef87e9ebf94a3c60869efdd9 100644 (file)
@@ -1490,7 +1490,7 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned
            ((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff)))
            reserved++;
     }
-    if ((count) || (reserved > 5) ||
+    if ((count == MAX_TUPLES) || (reserved > 5) ||
        ((!dev_ok || !ident_ok) && (count > 10)))
        count = 0;