Skip to content

Commit

Permalink
drivers/char/pcmcia/cm40x0_cs.c: fix release function call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Ritz authored and Linus Torvalds committed Aug 11, 2007
1 parent c5a69ad commit 925796e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/char/pcmcia/cm4000_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/pcmcia/cm4040_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ static int reader_config(struct pcmcia_device *link, int devno)

static void reader_release(struct pcmcia_device *link)
{
cm4040_reader_release(link->priv);
cm4040_reader_release(link);
pcmcia_disable_device(link);
}

Expand Down

0 comments on commit 925796e

Please sign in to comment.