From: H Hartley Sweeten Date: Mon, 29 Jul 2013 21:03:28 +0000 (-0700) Subject: staging: comedi: das16: move boardinfo declaration X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=46399a84b730d9c27e9e967eabe45d280ee79163;p=linux-beck.git staging: comedi: das16: move boardinfo declaration Now that the boardinfo does not require any forward declarations, move it near the definition of the struct. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index df7bf1e26c5e..b04b3ae6bf03 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -253,6 +253,218 @@ struct das16_board { unsigned int id; }; +static const struct das16_board das16_boards[] = { + { + .name = "das-16", + .ai_maxdata = 0x0fff, + .ai_speed = 15000, + .ai_pg = das16_pg_none, + .has_ao = 1, + .i8255_offset = 0x10, + .i8254_offset = 0x0c, + .size = 0x14, + .id = 0x00, + }, { + .name = "das-16g", + .ai_maxdata = 0x0fff, + .ai_speed = 15000, + .ai_pg = das16_pg_none, + .has_ao = 1, + .i8255_offset = 0x10, + .i8254_offset = 0x0c, + .size = 0x14, + .id = 0x00, + }, { + .name = "das-16f", + .ai_maxdata = 0x0fff, + .ai_speed = 8500, + .ai_pg = das16_pg_none, + .has_ao = 1, + .i8255_offset = 0x10, + .i8254_offset = 0x0c, + .size = 0x14, + .id = 0x00, + }, { + .name = "cio-das16", + .ai_maxdata = 0x0fff, + .ai_speed = 20000, + .ai_pg = das16_pg_none, + .has_ao = 1, + .i8255_offset = 0x10, + .i8254_offset = 0x0c, + .size = 0x14, + .id = 0x80, + }, { + .name = "cio-das16/f", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_none, + .has_ao = 1, + .i8255_offset = 0x10, + .i8254_offset = 0x0c, + .size = 0x14, + .id = 0x80, + }, { + .name = "cio-das16/jr", + .ai_maxdata = 0x0fff, + .ai_speed = 7692, + .ai_pg = das16_pg_16jr, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x10, + .id = 0x00, + }, { + .name = "pc104-das16jr", + .ai_maxdata = 0x0fff, + .ai_speed = 3300, + .ai_pg = das16_pg_16jr, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x10, + .id = 0x00, + }, { + .name = "cio-das16jr/16", + .ai_maxdata = 0xffff, + .ai_speed = 10000, + .ai_pg = das16_pg_16jr_16, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x10, + .id = 0x00, + }, { + .name = "pc104-das16jr/16", + .ai_maxdata = 0xffff, + .ai_speed = 10000, + .ai_pg = das16_pg_16jr_16, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x10, + .id = 0x00, + }, { + .name = "das-1201", + .ai_maxdata = 0x0fff, + .ai_speed = 20000, + .ai_pg = das16_pg_none, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0x20, + }, { + .name = "das-1202", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_none, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0x20, + }, { + .name = "das-1401", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_1601, + .i8255_offset = 0x0, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "das-1402", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_1602, + .i8255_offset = 0x0, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "das-1601", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_1601, + .has_ao = 1, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "das-1602", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_1602, + .has_ao = 1, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das1401/12", + .ai_maxdata = 0x0fff, + .ai_speed = 6250, + .ai_pg = das16_pg_1601, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das1402/12", + .ai_maxdata = 0x0fff, + .ai_speed = 6250, + .ai_pg = das16_pg_1602, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das1402/16", + .ai_maxdata = 0xffff, + .ai_speed = 10000, + .ai_pg = das16_pg_1602, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das1601/12", + .ai_maxdata = 0x0fff, + .ai_speed = 6250, + .ai_pg = das16_pg_1601, + .has_ao = 1, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das1602/12", + .ai_maxdata = 0x0fff, + .ai_speed = 10000, + .ai_pg = das16_pg_1602, + .has_ao = 1, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das1602/16", + .ai_maxdata = 0xffff, + .ai_speed = 10000, + .ai_pg = das16_pg_1602, + .has_ao = 1, + .i8255_offset = 0x400, + .i8254_offset = 0x0c, + .size = 0x408, + .id = 0xc0, + }, { + .name = "cio-das16/330", + .ai_maxdata = 0x0fff, + .ai_speed = 3030, + .ai_pg = das16_pg_16jr, + .i8255_offset = 0, + .i8254_offset = 0x0c, + .size = 0x14, + .id = 0xf0, + }, +}; + /* Period for timer interrupt in jiffies. It's a function * to deal with possibility of dynamic HZ patches */ static inline int timer_period(void) @@ -1066,218 +1278,6 @@ static void das16_detach(struct comedi_device *dev) comedi_legacy_detach(dev); } -static const struct das16_board das16_boards[] = { - { - .name = "das-16", - .ai_maxdata = 0x0fff, - .ai_speed = 15000, - .ai_pg = das16_pg_none, - .has_ao = 1, - .i8255_offset = 0x10, - .i8254_offset = 0x0c, - .size = 0x14, - .id = 0x00, - }, { - .name = "das-16g", - .ai_maxdata = 0x0fff, - .ai_speed = 15000, - .ai_pg = das16_pg_none, - .has_ao = 1, - .i8255_offset = 0x10, - .i8254_offset = 0x0c, - .size = 0x14, - .id = 0x00, - }, { - .name = "das-16f", - .ai_maxdata = 0x0fff, - .ai_speed = 8500, - .ai_pg = das16_pg_none, - .has_ao = 1, - .i8255_offset = 0x10, - .i8254_offset = 0x0c, - .size = 0x14, - .id = 0x00, - }, { - .name = "cio-das16", - .ai_maxdata = 0x0fff, - .ai_speed = 20000, - .ai_pg = das16_pg_none, - .has_ao = 1, - .i8255_offset = 0x10, - .i8254_offset = 0x0c, - .size = 0x14, - .id = 0x80, - }, { - .name = "cio-das16/f", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_none, - .has_ao = 1, - .i8255_offset = 0x10, - .i8254_offset = 0x0c, - .size = 0x14, - .id = 0x80, - }, { - .name = "cio-das16/jr", - .ai_maxdata = 0x0fff, - .ai_speed = 7692, - .ai_pg = das16_pg_16jr, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x10, - .id = 0x00, - }, { - .name = "pc104-das16jr", - .ai_maxdata = 0x0fff, - .ai_speed = 3300, - .ai_pg = das16_pg_16jr, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x10, - .id = 0x00, - }, { - .name = "cio-das16jr/16", - .ai_maxdata = 0xffff, - .ai_speed = 10000, - .ai_pg = das16_pg_16jr_16, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x10, - .id = 0x00, - }, { - .name = "pc104-das16jr/16", - .ai_maxdata = 0xffff, - .ai_speed = 10000, - .ai_pg = das16_pg_16jr_16, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x10, - .id = 0x00, - }, { - .name = "das-1201", - .ai_maxdata = 0x0fff, - .ai_speed = 20000, - .ai_pg = das16_pg_none, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0x20, - }, { - .name = "das-1202", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_none, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0x20, - }, { - .name = "das-1401", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_1601, - .i8255_offset = 0x0, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "das-1402", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_1602, - .i8255_offset = 0x0, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "das-1601", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_1601, - .has_ao = 1, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "das-1602", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_1602, - .has_ao = 1, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das1401/12", - .ai_maxdata = 0x0fff, - .ai_speed = 6250, - .ai_pg = das16_pg_1601, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das1402/12", - .ai_maxdata = 0x0fff, - .ai_speed = 6250, - .ai_pg = das16_pg_1602, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das1402/16", - .ai_maxdata = 0xffff, - .ai_speed = 10000, - .ai_pg = das16_pg_1602, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das1601/12", - .ai_maxdata = 0x0fff, - .ai_speed = 6250, - .ai_pg = das16_pg_1601, - .has_ao = 1, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das1602/12", - .ai_maxdata = 0x0fff, - .ai_speed = 10000, - .ai_pg = das16_pg_1602, - .has_ao = 1, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das1602/16", - .ai_maxdata = 0xffff, - .ai_speed = 10000, - .ai_pg = das16_pg_1602, - .has_ao = 1, - .i8255_offset = 0x400, - .i8254_offset = 0x0c, - .size = 0x408, - .id = 0xc0, - }, { - .name = "cio-das16/330", - .ai_maxdata = 0x0fff, - .ai_speed = 3030, - .ai_pg = das16_pg_16jr, - .i8255_offset = 0, - .i8254_offset = 0x0c, - .size = 0x14, - .id = 0xf0, - }, -}; - static struct comedi_driver das16_driver = { .driver_name = "das16", .module = THIS_MODULE,