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

staging: comedi: pcl726: remove the *_SIZE defines

The *_SIZE defines are only used to initialize the 'io_range' members in
the boardinfo. Remove the defines and just open code the values.

For aesthetics, change the type of the 'io_range' and rename it to better
match the 'len' parameter to comedi_request_region().
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 06b819ee
......@@ -67,10 +67,6 @@ Interrupts are not supported.
#include "../comedidev.h"
#define PCL726_SIZE 16
#define PCL727_SIZE 32
#define PCL728_SIZE 8
#define PCL726_AO_MSB_REG(x) (0x00 + ((x) * 2))
#define PCL726_AO_LSB_REG(x) (0x01 + ((x) * 2))
#define PCL726_DO_MSB_REG 0x0c
......@@ -110,9 +106,9 @@ static const struct comedi_lrange *const rangelist_728[] = {
struct pcl726_board {
const char *name;
int n_aochan;
unsigned int io_range;
unsigned long io_len;
unsigned int irq_mask;
int n_aochan;
unsigned int have_dio:1;
unsigned int is_pcl727:1;
const struct comedi_lrange *const *ao_ranges;
......@@ -122,37 +118,37 @@ struct pcl726_board {
static const struct pcl726_board boardtypes[] = {
{
.name = "pcl726",
.io_len = 0x10,
.n_aochan = 6,
.io_range = PCL726_SIZE,
.have_dio = 1,
.ao_ranges = &rangelist_726[0],
.ao_num_ranges = ARRAY_SIZE(rangelist_726),
}, {
.name = "pcl727",
.io_len = 0x20,
.n_aochan = 12,
.io_range = PCL727_SIZE,
.have_dio = 1,
.is_pcl727 = 1,
.ao_ranges = &rangelist_727[0],
.ao_num_ranges = ARRAY_SIZE(rangelist_727),
}, {
.name = "pcl728",
.io_len = 0x08,
.n_aochan = 2,
.io_range = PCL728_SIZE,
.ao_num_ranges = ARRAY_SIZE(rangelist_728),
.ao_ranges = &rangelist_728[0],
}, {
.name = "acl6126",
.n_aochan = 6,
.io_range = PCL726_SIZE,
.io_len = 0x10,
.irq_mask = 0x96e8,
.n_aochan = 6,
.have_dio = 1,
.ao_num_ranges = ARRAY_SIZE(rangelist_726),
.ao_ranges = &rangelist_726[0],
}, {
.name = "acl6128",
.io_len = 0x08,
.n_aochan = 2,
.io_range = PCL728_SIZE,
.ao_num_ranges = ARRAY_SIZE(rangelist_728),
.ao_ranges = &rangelist_728[0],
},
......@@ -269,7 +265,7 @@ static int pcl726_attach(struct comedi_device *dev,
int ret;
int i;
ret = comedi_request_region(dev, it->options[0], board->io_range);
ret = comedi_request_region(dev, it->options[0], board->io_len);
if (ret)
return ret;
......
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