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

staging: comedi: das16m1: 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 4e9cd213
......@@ -28,7 +28,7 @@
Driver: das16m1
Description: CIO-DAS16/M1
Author: Frank Mori Hess <fmhess@users.sourceforge.net>
Devices: [Measurement Computing] CIO-DAS16/M1 (cio-das16/m1)
Devices: [Measurement Computing] CIO-DAS16/M1 (das16m1)
Status: works
This driver supports a single board - the CIO-DAS16/M1.
......@@ -132,11 +132,6 @@ static const struct comedi_lrange range_das16m1 = { 9,
}
};
struct das16m1_board {
const char *name;
unsigned int ai_speed;
};
struct das16m1_private_struct {
unsigned int control_state;
volatile unsigned int adc_count; /* number of samples completed */
......@@ -167,7 +162,6 @@ static void munge_sample_array(short *array, unsigned int num_elements)
static int das16m1_cmd_test(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
const struct das16m1_board *board = comedi_board(dev);
unsigned int err = 0, tmp, i;
/* Step 1 : check if triggers are trivially valid */
......@@ -207,8 +201,8 @@ static int das16m1_cmd_test(struct comedi_device *dev,
}
if (cmd->convert_src == TRIG_TIMER) {
if (cmd->convert_arg < board->ai_speed) {
cmd->convert_arg = board->ai_speed;
if (cmd->convert_arg < 1000) {
cmd->convert_arg = 1000;
err++;
}
}
......@@ -582,26 +576,25 @@ static int das16m1_irq_bits(unsigned int irq)
static int das16m1_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
const struct das16m1_board *board = comedi_board(dev);
struct comedi_subdevice *s;
int ret;
unsigned int irq;
unsigned long iobase;
dev->board_name = dev->driver->driver_name;
iobase = it->options[0];
ret = alloc_private(dev, sizeof(struct das16m1_private_struct));
if (ret < 0)
return ret;
dev->board_name = board->name;
if (!request_region(iobase, DAS16M1_SIZE, dev->driver->driver_name)) {
if (!request_region(iobase, DAS16M1_SIZE, dev->board_name)) {
comedi_error(dev, "I/O port conflict\n");
return -EIO;
}
if (!request_region(iobase + DAS16M1_82C55, DAS16M1_SIZE2,
dev->driver->driver_name)) {
dev->board_name)) {
release_region(iobase, DAS16M1_SIZE);
comedi_error(dev, "I/O port conflict\n");
return -EIO;
......@@ -698,21 +691,11 @@ static void das16m1_detach(struct comedi_device *dev)
}
}
static const struct das16m1_board das16m1_boards[] = {
{
.name = "cio-das16/m1", /* CIO-DAS16_M1.pdf */
.ai_speed = 1000, /* 1MHz max speed */
},
};
static struct comedi_driver das16m1_driver = {
.driver_name = "das16m1",
.module = THIS_MODULE,
.attach = das16m1_attach,
.detach = das16m1_detach,
.board_name = &das16m1_boards[0].name,
.num_names = ARRAY_SIZE(das16m1_boards),
.offset = sizeof(das16m1_boards[0]),
};
module_comedi_driver(das16m1_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