drivers/char/pcmcia/cm40x0_cs.c: fix release function call
authorDaniel Ritz <daniel.ritz-ml@swissonline.ch>
Fri, 10 Aug 2007 20:00:58 +0000 (13:00 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 11 Aug 2007 22:47:40 +0000 (15:47 -0700)
cm4000_cs.c and cm4040_cs.c call the internal release function with
an argument of wrong type. this fixes bug #8485

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Bill McConnaughey <mcconnau@biochem.wustl.edu>
Cc: Natalie Protasevich <protasnb@gmail.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/cm4040_cs.c

index fee58e03dbe2bb30e5d8d715e9fab42be3b04e85..4177f6db83e9c45336bf0b604dd113424b8076ad 100644 (file)
@@ -1629,7 +1629,7 @@ static int cmm_open(struct inode *inode, struct file *filp)
 {
        struct cm4000_dev *dev;
        struct pcmcia_device *link;
-       int rc, minor = iminor(inode);
+       int minor = iminor(inode);
 
        if (minor >= CM4000_MAX_DEV)
                return -ENODEV;
@@ -1668,7 +1668,6 @@ static int cmm_open(struct inode *inode, struct file *filp)
        start_monitor(dev);
 
        link->open = 1;         /* only one open per device */
-       rc = 0;
 
        DEBUGP(2, dev, "<- cmm_open\n");
        return nonseekable_open(inode, filp);
@@ -1824,7 +1823,7 @@ static int cm4000_resume(struct pcmcia_device *link)
 
 static void cm4000_release(struct pcmcia_device *link)
 {
-       cmm_cm4000_release(link->priv); /* delay release until device closed */
+       cmm_cm4000_release(link);       /* delay release until device closed */
        pcmcia_disable_device(link);
 }
 
index af88181a17f477cd01e5a1f2644a9c8039619262..b24a3e7bbb9f23b409a77dfb2ffc4ff93a0c9f26 100644 (file)
@@ -599,7 +599,7 @@ cs_release:
 
 static void reader_release(struct pcmcia_device *link)
 {
-       cm4040_reader_release(link->priv);
+       cm4040_reader_release(link);
        pcmcia_disable_device(link);
 }