From d93c768e66d8c3970187c179a91a2553b077d9e8 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Tue, 15 Jul 2008 20:11:21 +0200 Subject: pcmcia: fix return value in cm4000_cs.c should be -EINVAL, not EINVAL. Found by Peter Stuge. Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/cm4000_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 59ca35156d81..e4a4fbd37d7a 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1439,7 +1439,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) DEBUGP(4, dev, "CMM_ABSENT flag set\n"); goto out; } - rc = EINVAL; + rc = -EINVAL; if (_IOC_TYPE(cmd) != CM_IOC_MAGIC) { DEBUGP(4, dev, "ioctype mismatch\n"); -- cgit v1.2.3 From 002b90a1bf5fe9c8de7a8634403a685621841ff3 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Tue, 15 Jul 2008 15:26:15 +0200 Subject: pcmcia: fix cisinfo_t removal 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 Signed-off-by: Dominik Brodowski --- drivers/pcmcia/cistpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 9fcff0c33619..65129b54eb09 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -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; -- cgit v1.2.3 From 417e1494fd70715b737428cc3c3d924255f22ba1 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 15 Jul 2008 11:30:00 -0500 Subject: pcmcia: ide-cs: Remove outdated comment There is an outdated version information comment in ide-cs. Signed-off-by: Larry Finger Signed-off-by: Dominik Brodowski --- drivers/ide/legacy/ide-cs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 8dbf4d9b6447..41a2e251d53d 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c @@ -66,8 +66,6 @@ MODULE_LICENSE("Dual MPL/GPL"); #ifdef CONFIG_PCMCIA_DEBUG INT_MODULE_PARM(pc_debug, 0); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) -/*static char *version = -"ide-cs.c 1.3 2002/10/26 05:45:31 (David Hinds)";*/ #else #define DEBUG(n, args...) #endif -- cgit v1.2.3