staging: comedi: das16m1: remove boardinfo
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 8 Oct 2012 17:46:12 +0000 (10:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 18:51:31 +0000 (11:51 -0700)
This driver only supports a single "boardtype". Remove the unneeded
boardinfo struct and its use in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das16m1.c

index 3f87d7598e5bd29d419b47a5ff9e79fe26871150..c43172750ab1357e3ec738a2b11f22b378142921 100644 (file)
@@ -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);