[Bug 8485] New: cmm_cm4000_release wants a "struct pcmcia_device *" arg, but cm4000_release gives it a "struct cm4000_dev *"

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed May 16 16:50:27 EDT 2007


http://bugzilla.kernel.org/show_bug.cgi?id=8485

           Summary: cmm_cm4000_release wants a "struct pcmcia_device *" arg,
                    but cm4000_release gives it a "struct cm4000_dev *"
    Kernel Version: 2.6.18
            Status: NEW
          Severity: normal
             Owner: linux-pcmcia at lists.infradead.org
         Submitter: mcconnau at biochem.wustl.edu


Most recent kernel where this bug did *NOT* occur:
Distribution:
Hardware Environment:
Software Environment:
Problem Description:
These exerpts from linux-2.6.18/drivers/char/pcmcia/cm4000_cs.c show an
inconsistency:  "cmm_cm4000_release" takes a "struct pcmcia_device *"
argument, but "cm4000_release" is giving it a "struct cm4000_dev *"
argument.  I don't have the means to test this (I'm studying the code
as an example).

struct cm4000_dev {
        struct pcmcia_device *p_dev;
.....
}

static void cmm_cm4000_release(struct pcmcia_device * link)
{
        struct cm4000_dev *dev = link->priv;
.....
                wait_event(dev->devq, (link->open == 0));
.....
}

static void cm4000_release(struct pcmcia_device *link)
{
        cmm_cm4000_release(link->priv); /* delay release until device closed */
        pcmcia_disable_device(link);
}

static int cm4000_probe(struct pcmcia_device *link)
{
        struct cm4000_dev *dev;
.....
        dev->p_dev = link;
        link->priv = dev;
.....
}

Other stuff:
-- cmm_open has variable "rc" which is set to 0 but not used
-- where cm4000_config calls pcmcia_request_configuration, in case of error it
sets fail_fn and goes to cs_release.  I think that should be cs_failed.



Steps to reproduce:

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the linux-pcmcia mailing list