Skip to content

Commit

Permalink
drivers/staging/comedi: dev_node removal (ni_labpc_cs)
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Javier Martinez Canillas authored and Dominik Brodowski committed May 17, 2010
1 parent 7895059 commit 99bd8f2
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions drivers/staging/comedi/drivers/ni_labpc_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ static const dev_info_t dev_info = "daqcard-1200";

struct local_info_t {
struct pcmcia_device *link;
dev_node_t node;
int stop;
struct bus_operations *bus;
};
Expand Down Expand Up @@ -265,10 +264,8 @@ static void labpc_cs_detach(struct pcmcia_device *link)
the release() function is called, that will trigger a proper
detach().
*/
if (link->dev_node) {
((struct local_info_t *)link->priv)->stop = 1;
labpc_release(link);
}
((struct local_info_t *)link->priv)->stop = 1;
labpc_release(link);

/* This points to the parent local_info_t struct (may be null) */
kfree(link->priv);
Expand Down Expand Up @@ -350,7 +347,6 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,

static void labpc_config(struct pcmcia_device *link)
{
struct local_info_t *dev = link->priv;
int ret;
win_req_t req;

Expand All @@ -374,17 +370,8 @@ static void labpc_config(struct pcmcia_device *link)
if (ret)
goto failed;

/*
At this point, the dev_node_t structure(s) need to be
initialized and arranged in a linked list at link->dev.
*/
sprintf(dev->node.dev_name, "daqcard-1200");
dev->node.major = dev->node.minor = 0;
link->dev_node = &dev->node;

/* Finally, report what we've done */
printk(KERN_INFO "%s: index 0x%02x",
dev->node.dev_name, link->conf.ConfigIndex);
dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq);
if (link->io.NumPorts1)
Expand Down

0 comments on commit 99bd8f2

Please sign in to comment.