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

staging: comedi: rti800: cleanup boardinfo

For aesthetic reasons, move the boardinfo table near the struct
definition. Reformat the boardinfo in C99 format and add some
whitespace to help readability.

Rename the boardinfotable so it has namespace associated with
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 74236324
...@@ -125,11 +125,20 @@ static const struct comedi_lrange range_rti800_ai_unipolar = { ...@@ -125,11 +125,20 @@ static const struct comedi_lrange range_rti800_ai_unipolar = {
}; };
struct rti800_board { struct rti800_board {
const char *name; const char *name;
int has_ao; int has_ao;
}; };
static const struct rti800_board rti800_boardtypes[] = {
{
.name = "rti800",
.has_ao = 0,
}, {
.name = "rti815",
.has_ao = 1,
},
};
struct rti800_private { struct rti800_private {
enum { enum {
adc_diff, adc_pseudodiff, adc_singleended adc_diff, adc_pseudodiff, adc_singleended
...@@ -438,18 +447,13 @@ static void rti800_detach(struct comedi_device *dev) ...@@ -438,18 +447,13 @@ static void rti800_detach(struct comedi_device *dev)
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
} }
static const struct rti800_board boardtypes[] = {
{ "rti800", 0 },
{ "rti815", 1 },
};
static struct comedi_driver rti800_driver = { static struct comedi_driver rti800_driver = {
.driver_name = "rti800", .driver_name = "rti800",
.module = THIS_MODULE, .module = THIS_MODULE,
.attach = rti800_attach, .attach = rti800_attach,
.detach = rti800_detach, .detach = rti800_detach,
.num_names = ARRAY_SIZE(boardtypes), .num_names = ARRAY_SIZE(rti800_boardtypes),
.board_name = &boardtypes[0].name, .board_name = &rti800_boardtypes[0].name,
.offset = sizeof(struct rti800_board), .offset = sizeof(struct rti800_board),
}; };
module_comedi_driver(rti800_driver); module_comedi_driver(rti800_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