Commit 4e9cd213 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: dmm32at: remove boardinfo

This driver only supports a single "boardtype". Remove the unneeded
boardinfo struct and its use in the driver.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c9378767
...@@ -158,10 +158,6 @@ static const struct comedi_lrange dmm32at_aoranges = { ...@@ -158,10 +158,6 @@ static const struct comedi_lrange dmm32at_aoranges = {
} }
}; };
struct dmm32at_board {
const char *name;
};
struct dmm32at_private { struct dmm32at_private {
int data; int data;
...@@ -718,7 +714,6 @@ static int dmm32at_dio_insn_config(struct comedi_device *dev, ...@@ -718,7 +714,6 @@ static int dmm32at_dio_insn_config(struct comedi_device *dev,
static int dmm32at_attach(struct comedi_device *dev, static int dmm32at_attach(struct comedi_device *dev,
struct comedi_devconfig *it) struct comedi_devconfig *it)
{ {
const struct dmm32at_board *board = comedi_board(dev);
struct dmm32at_private *devpriv; struct dmm32at_private *devpriv;
int ret; int ret;
struct comedi_subdevice *s; struct comedi_subdevice *s;
...@@ -726,6 +721,8 @@ static int dmm32at_attach(struct comedi_device *dev, ...@@ -726,6 +721,8 @@ static int dmm32at_attach(struct comedi_device *dev,
unsigned long iobase; unsigned long iobase;
unsigned int irq; unsigned int irq;
dev->board_name = dev->driver->driver_name;
iobase = it->options[0]; iobase = it->options[0];
irq = it->options[1]; irq = it->options[1];
...@@ -734,7 +731,7 @@ static int dmm32at_attach(struct comedi_device *dev, ...@@ -734,7 +731,7 @@ static int dmm32at_attach(struct comedi_device *dev,
iobase, irq); iobase, irq);
/* register address space */ /* 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", printk(KERN_ERR "comedi%d: dmm32at: I/O port conflict\n",
dev->minor); dev->minor);
return -EIO; return -EIO;
...@@ -788,7 +785,7 @@ static int dmm32at_attach(struct comedi_device *dev, ...@@ -788,7 +785,7 @@ static int dmm32at_attach(struct comedi_device *dev,
/* board is there, register interrupt */ /* board is there, register interrupt */
if (irq) { 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) { if (ret < 0) {
printk(KERN_ERR "dmm32at: irq conflict\n"); printk(KERN_ERR "dmm32at: irq conflict\n");
return ret; return ret;
...@@ -796,8 +793,6 @@ static int dmm32at_attach(struct comedi_device *dev, ...@@ -796,8 +793,6 @@ static int dmm32at_attach(struct comedi_device *dev,
dev->irq = irq; dev->irq = irq;
} }
dev->board_name = board->name;
if (alloc_private(dev, sizeof(*devpriv)) < 0) if (alloc_private(dev, sizeof(*devpriv)) < 0)
return -ENOMEM; return -ENOMEM;
devpriv = dev->private; devpriv = dev->private;
...@@ -867,20 +862,11 @@ static void dmm32at_detach(struct comedi_device *dev) ...@@ -867,20 +862,11 @@ static void dmm32at_detach(struct comedi_device *dev)
release_region(dev->iobase, DMM32AT_MEMSIZE); release_region(dev->iobase, DMM32AT_MEMSIZE);
} }
static const struct dmm32at_board dmm32at_boards[] = {
{
.name = "dmm32at",
},
};
static struct comedi_driver dmm32at_driver = { static struct comedi_driver dmm32at_driver = {
.driver_name = "dmm32at", .driver_name = "dmm32at",
.module = THIS_MODULE, .module = THIS_MODULE,
.attach = dmm32at_attach, .attach = dmm32at_attach,
.detach = dmm32at_detach, .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); module_comedi_driver(dmm32at_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment