Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364059
b: refs/heads/master
c: efe4567
h: refs/heads/master
i:
  364057: e862963
  364055: d030671
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent dcad3d4 commit 1f16270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 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: 2dd11a812aa908b3a8f2f88cce9f0c24c34c3cab
refs/heads/master: efe4567c54c628f0626f98a3355aa82a45bb14c0
22 changes: 4 additions & 18 deletions trunk/drivers/staging/comedi/drivers/fl512.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,30 +111,18 @@ static int fl512_ao_insn_readback(struct comedi_device *dev,
static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct fl512_private *devpriv;
unsigned long iobase;
int ret;

/* pointer to the subdevice: Analog in, Analog out,
(not made ->and Digital IO) */
struct comedi_subdevice *s;
int ret;

iobase = it->options[0];
printk(KERN_INFO "comedi:%d fl512: 0x%04lx", dev->minor, iobase);
if (!request_region(iobase, FL512_SIZE, "fl512")) {
printk(KERN_WARNING " I/O port conflict\n");
return -EIO;
}
dev->iobase = iobase;
ret = comedi_request_region(dev, it->options[0], FL512_SIZE);
if (ret)
return ret;

devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
return -ENOMEM;
dev->private = devpriv;

#if DEBUG
printk(KERN_DEBUG "malloc ok\n");
#endif

ret = comedi_alloc_subdevices(dev, 2);
if (ret)
return ret;
Expand All @@ -156,7 +144,6 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->range_table = &range_fl512;
/* function to call when read AD */
s->insn_read = fl512_ai_insn;
printk(KERN_INFO "comedi: fl512: subdevice 0 initialized\n");

/* Analog output */
s = &dev->subdevices[1];
Expand All @@ -174,7 +161,6 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_write = fl512_ao_insn;
/* function to call when reading DA */
s->insn_read = fl512_ao_insn_readback;
printk(KERN_INFO "comedi: fl512: subdevice 1 initialized\n");

return 1;
}
Expand Down

0 comments on commit 1f16270

Please sign in to comment.