Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337079
b: refs/heads/master
c: 4e9cd21
h: refs/heads/master
i:
  337077: b413351
  337075: 5e51c80
  337071: 501b538
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 22, 2012
1 parent 85c8da4 commit 3006f79
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: c937876787c4f7aaca421fbb07d0e763e70ff6fa
refs/heads/master: 4e9cd21340a11240ca4ff8a437e6442bc8fc90eb
22 changes: 4 additions & 18 deletions trunk/drivers/staging/comedi/drivers/dmm32at.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ static const struct comedi_lrange dmm32at_aoranges = {
}
};

struct dmm32at_board {
const char *name;
};

struct dmm32at_private {

int data;
Expand Down Expand Up @@ -718,14 +714,15 @@ static int dmm32at_dio_insn_config(struct comedi_device *dev,
static int dmm32at_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
const struct dmm32at_board *board = comedi_board(dev);
struct dmm32at_private *devpriv;
int ret;
struct comedi_subdevice *s;
unsigned char aihi, ailo, fifostat, aistat, intstat, airback;
unsigned long iobase;
unsigned int irq;

dev->board_name = dev->driver->driver_name;

iobase = it->options[0];
irq = it->options[1];

Expand All @@ -734,7 +731,7 @@ static int dmm32at_attach(struct comedi_device *dev,
iobase, irq);

/* register address space */
if (!request_region(iobase, DMM32AT_MEMSIZE, board->name)) {
if (!request_region(iobase, DMM32AT_MEMSIZE, dev->board_name)) {
printk(KERN_ERR "comedi%d: dmm32at: I/O port conflict\n",
dev->minor);
return -EIO;
Expand Down Expand Up @@ -788,16 +785,14 @@ static int dmm32at_attach(struct comedi_device *dev,

/* board is there, register interrupt */
if (irq) {
ret = request_irq(irq, dmm32at_isr, 0, board->name, dev);
ret = request_irq(irq, dmm32at_isr, 0, dev->board_name, dev);
if (ret < 0) {
printk(KERN_ERR "dmm32at: irq conflict\n");
return ret;
}
dev->irq = irq;
}

dev->board_name = board->name;

if (alloc_private(dev, sizeof(*devpriv)) < 0)
return -ENOMEM;
devpriv = dev->private;
Expand Down Expand Up @@ -867,20 +862,11 @@ static void dmm32at_detach(struct comedi_device *dev)
release_region(dev->iobase, DMM32AT_MEMSIZE);
}

static const struct dmm32at_board dmm32at_boards[] = {
{
.name = "dmm32at",
},
};

static struct comedi_driver dmm32at_driver = {
.driver_name = "dmm32at",
.module = THIS_MODULE,
.attach = dmm32at_attach,
.detach = dmm32at_detach,
.board_name = &dmm32at_boards[0].name,
.offset = sizeof(struct dmm32at_board),
.num_names = ARRAY_SIZE(dmm32at_boards),
};
module_comedi_driver(dmm32at_driver);

Expand Down

0 comments on commit 3006f79

Please sign in to comment.