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

staging: comedi: amplc_dio200.h: remove struct dio200_layout definition

This struct is used to provide part of the boardinfo data. Using the extra
indirection does not provide any additional clarity to the driver.

Absorb the members from dio200_layout into dio200_board and remove the
extra 'layout' indirection.

For aesthetics, rename all the local variables used for the boardinfo
pointer to 'board'.
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 593d11c5
......@@ -202,53 +202,47 @@
*/
static const struct dio200_board dio200_isa_boards[] = {
{
.name = "pc212e",
.layout = {
.n_subdevs = 6,
.sdtype = {sd_8255, sd_8254, sd_8254, sd_8254, sd_8254,
sd_intr},
.sdinfo = {0x00, 0x08, 0x0C, 0x10, 0x14, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.name = "pc212e",
.n_subdevs = 6,
.sdtype = {
sd_8255, sd_8254, sd_8254, sd_8254, sd_8254, sd_intr
},
},
{
.name = "pc214e",
.layout = {
.n_subdevs = 4,
.sdtype = {sd_8255, sd_8255, sd_8254, sd_intr},
.sdinfo = {0x00, 0x08, 0x10, 0x01},
.sdinfo = { 0x00, 0x08, 0x0c, 0x10, 0x14, 0x3f },
.has_int_sce = true,
.has_clk_gat_sce = true,
}, {
.name = "pc214e",
.n_subdevs = 4,
.sdtype = {
sd_8255, sd_8255, sd_8254, sd_intr
},
},
{
.name = "pc215e",
.layout = {
.n_subdevs = 5,
.sdtype = {sd_8255, sd_8255, sd_8254, sd_8254, sd_intr},
.sdinfo = {0x00, 0x08, 0x10, 0x14, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.sdinfo = { 0x00, 0x08, 0x10, 0x01 },
}, {
.name = "pc215e",
.n_subdevs = 5,
.sdtype = {
sd_8255, sd_8255, sd_8254, sd_8254, sd_intr
},
},
{
.name = "pc218e",
.layout = {
.n_subdevs = 7,
.sdtype = {sd_8254, sd_8254, sd_8255, sd_8254, sd_8254,
sd_intr},
.sdinfo = {0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.sdinfo = { 0x00, 0x08, 0x10, 0x14, 0x3f },
.has_int_sce = true,
.has_clk_gat_sce = true,
}, {
.name = "pc218e",
.n_subdevs = 7,
.sdtype = {
sd_8254, sd_8254, sd_8255, sd_8254, sd_8254, sd_intr
},
},
{
.name = "pc272e",
.layout = {
.n_subdevs = 4,
.sdtype = {sd_8255, sd_8255, sd_8255, sd_intr},
.sdinfo = {0x00, 0x08, 0x10, 0x3F},
.has_int_sce = true,
.sdinfo = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, 0x3f },
.has_int_sce = true,
.has_clk_gat_sce = true,
}, {
.name = "pc272e",
.n_subdevs = 4,
.sdtype = {
sd_8255, sd_8255, sd_8255, sd_intr
},
.sdinfo = { 0x00, 0x08, 0x10, 0x3f },
.has_int_sce = true,
},
};
......
......@@ -31,11 +31,10 @@ enum dio200_sdtype { sd_none, sd_intr, sd_8255, sd_8254, sd_timer };
#define DIO200_MAX_SUBDEVS 8
#define DIO200_MAX_ISNS 6
/*
* Board descriptions.
*/
struct dio200_layout {
struct dio200_board {
const char *name;
unsigned char mainbar;
unsigned char mainshift;
unsigned short n_subdevs; /* number of subdevices */
unsigned char sdtype[DIO200_MAX_SUBDEVS]; /* enum dio200_sdtype */
unsigned char sdinfo[DIO200_MAX_SUBDEVS]; /* depends on sdtype */
......@@ -44,13 +43,6 @@ struct dio200_layout {
bool has_enhancements:1; /* has enhanced features */
};
struct dio200_board {
const char *name;
struct dio200_layout layout;
unsigned char mainbar;
unsigned char mainshift;
};
int amplc_dio200_common_attach(struct comedi_device *dev, unsigned int irq,
unsigned long req_irq_flags);
......
......@@ -242,70 +242,73 @@ enum dio200_pci_model {
static const struct dio200_board dio200_pci_boards[] = {
[pci215_model] = {
.name = "pci215",
.mainbar = 2,
.layout = {
.n_subdevs = 5,
.sdtype = {sd_8255, sd_8255, sd_8254, sd_8254, sd_intr},
.sdinfo = {0x00, 0x08, 0x10, 0x14, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.name = "pci215",
.mainbar = 2,
.n_subdevs = 5,
.sdtype = {
sd_8255, sd_8255, sd_8254, sd_8254, sd_intr
},
.sdinfo = { 0x00, 0x08, 0x10, 0x14, 0x3f },
.has_int_sce = true,
.has_clk_gat_sce = true,
},
[pci272_model] = {
.name = "pci272",
.mainbar = 2,
.layout = {
.n_subdevs = 4,
.sdtype = {sd_8255, sd_8255, sd_8255, sd_intr},
.sdinfo = {0x00, 0x08, 0x10, 0x3F},
.has_int_sce = true,
.name = "pci272",
.mainbar = 2,
.n_subdevs = 4,
.sdtype = {
sd_8255, sd_8255, sd_8255, sd_intr
},
.sdinfo = { 0x00, 0x08, 0x10, 0x3f },
.has_int_sce = true,
},
[pcie215_model] = {
.name = "pcie215",
.mainbar = 1,
.mainshift = 3,
.layout = {
.n_subdevs = 8,
.sdtype = {sd_8255, sd_none, sd_8255, sd_none,
sd_8254, sd_8254, sd_timer, sd_intr},
.sdinfo = {0x00, 0x00, 0x08, 0x00,
0x10, 0x14, 0x00, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.has_enhancements = true,
.name = "pcie215",
.mainbar = 1,
.mainshift = 3,
.n_subdevs = 8,
.sdtype = {
sd_8255, sd_none, sd_8255, sd_none,
sd_8254, sd_8254, sd_timer, sd_intr
},
.sdinfo = {
0x00, 0x00, 0x08, 0x00, 0x10, 0x14, 0x00, 0x3f
},
.has_int_sce = true,
.has_clk_gat_sce = true,
.has_enhancements = true,
},
[pcie236_model] = {
.name = "pcie236",
.mainbar = 1,
.mainshift = 3,
.layout = {
.n_subdevs = 8,
.sdtype = {sd_8255, sd_none, sd_none, sd_none,
sd_8254, sd_8254, sd_timer, sd_intr},
.sdinfo = {0x00, 0x00, 0x00, 0x00,
0x10, 0x14, 0x00, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.has_enhancements = true,
.name = "pcie236",
.mainbar = 1,
.mainshift = 3,
.n_subdevs = 8,
.sdtype = {
sd_8255, sd_none, sd_none, sd_none,
sd_8254, sd_8254, sd_timer, sd_intr
},
.sdinfo = {
0x00, 0x00, 0x00, 0x00, 0x10, 0x14, 0x00, 0x3f
},
.has_int_sce = true,
.has_clk_gat_sce = true,
.has_enhancements = true,
},
[pcie296_model] = {
.name = "pcie296",
.mainbar = 1,
.mainshift = 3,
.layout = {
.n_subdevs = 8,
.sdtype = {sd_8255, sd_8255, sd_8255, sd_8255,
sd_8254, sd_8254, sd_timer, sd_intr},
.sdinfo = {0x00, 0x04, 0x08, 0x0C,
0x10, 0x14, 0x00, 0x3F},
.has_int_sce = true,
.has_clk_gat_sce = true,
.has_enhancements = true,
.name = "pcie296",
.mainbar = 1,
.mainshift = 3,
.n_subdevs = 8,
.sdtype = {
sd_8255, sd_8255, sd_8255, sd_8255,
sd_8254, sd_8254, sd_timer, sd_intr
},
.sdinfo = {
0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, 0x00, 0x3f
},
.has_int_sce = true,
.has_clk_gat_sce = true,
.has_enhancements = true,
},
};
......
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