Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354458
b: refs/heads/master
c: 5cd8e85
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 6, 2013
1 parent a6b4ed2 commit 8e6d81e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3ac95195b020a0a8fa2a9b0649145324ba64c83
refs/heads/master: 5cd8e852629fc7f1bdaacbdd32fe4139b9944f8b
16 changes: 4 additions & 12 deletions trunk/drivers/staging/comedi/drivers/ni_mio_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,15 @@ static int mio_cs_auto_attach(struct comedi_device *dev,
dev->board_ptr = board;
dev->board_name = board->name;

link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;

ret = pcmcia_loop_config(link, mio_pcmcia_config_loop, NULL);
link->config_flags |= CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
ret = comedi_pcmcia_enable(dev, mio_pcmcia_config_loop);
if (ret)
return ret;
dev->iobase = link->resource[0]->start;

if (!link->irq)
return -EINVAL;

ret = pcmcia_enable_device(link);
if (ret)
return ret;
dev->iobase = link->resource[0]->start;

ret = request_irq(link->irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
dev->board_name, dev);
if (ret < 0)
Expand All @@ -286,13 +281,10 @@ static int mio_cs_auto_attach(struct comedi_device *dev,

static void mio_cs_detach(struct comedi_device *dev)
{
struct pcmcia_device *link = comedi_to_pcmcia_dev(dev);

mio_common_detach(dev);
if (dev->irq)
free_irq(dev->irq, dev);
if (dev->iobase)
pcmcia_disable_device(link);
comedi_pcmcia_disable(dev);
}

static struct comedi_driver driver_ni_mio_cs = {
Expand Down

0 comments on commit 8e6d81e

Please sign in to comment.