From: H Hartley Sweeten Date: Thu, 26 Jun 2014 17:13:08 +0000 (-0700) Subject: staging: comedi: ni_stc.h: the boardinfo 'name' should be first X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b674f9df207dc7da7b77ada82e0fb072ba06267c;p=deliverable%2Flinux.git staging: comedi: ni_stc.h: the boardinfo 'name' should be first By convention, the first member of the boardinfo is a 'const char *' to the board name, especially for those comedi drivers that rely on the comedi core to set dev->board_ptr to the entry matching the board name when doing a legacy (*attach) to a comedi driver. Modify the ni_board_struct appropriately for consistency, although the board name is only used for informational purposes by this driver (only the driver name is matched by the comedi core). For aesthetics, also move the members in the boardinfo declarations. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 3ea49c79cec7..230879faef92 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -107,9 +107,9 @@ are not supported. static const struct ni_board_struct ni_boards[] = { { + .name = "at-mio-16e-1", .device_id = 44, .isapnp_id = 0x0000, /* XXX unknown */ - .name = "at-mio-16e-1", .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 8192, @@ -124,9 +124,9 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { mb88341 }, }, { + .name = "at-mio-16e-2", .device_id = 25, .isapnp_id = 0x1900, - .name = "at-mio-16e-2", .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 2048, @@ -141,9 +141,9 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { mb88341 }, }, { + .name = "at-mio-16e-10", .device_id = 36, .isapnp_id = 0x2400, - .name = "at-mio-16e-10", .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 512, @@ -157,9 +157,9 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { ad8804_debug }, }, { + .name = "at-mio-16de-10", .device_id = 37, .isapnp_id = 0x2500, - .name = "at-mio-16de-10", .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 512, @@ -174,9 +174,9 @@ static const struct ni_board_struct ni_boards[] = { .caldac = { ad8804_debug }, .has_8255 = 1, }, { + .name = "at-mio-64e-3", .device_id = 38, .isapnp_id = 0x2600, - .name = "at-mio-64e-3", .n_adchan = 64, .adbits = 12, .ai_fifo_depth = 2048, @@ -191,9 +191,9 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { ad8804_debug }, }, { + .name = "at-mio-16xe-50", .device_id = 39, .isapnp_id = 0x2700, - .name = "at-mio-16xe-50", .n_adchan = 16, .adbits = 16, .ai_fifo_depth = 512, @@ -207,9 +207,9 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { dac8800, dac8043 }, }, { + .name = "at-mio-16xe-10", .device_id = 50, .isapnp_id = 0x0000, /* XXX unknown */ - .name = "at-mio-16xe-10", .n_adchan = 16, .adbits = 16, .ai_fifo_depth = 512, @@ -225,9 +225,9 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { dac8800, dac8043, ad8522 }, }, { + .name = "at-ai-16xe-10", .device_id = 51, .isapnp_id = 0x0000, /* XXX unknown */ - .name = "at-ai-16xe-10", .n_adchan = 16, .adbits = 16, .ai_fifo_depth = 512, diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c index f6cab5cf6808..f58be63d9226 100644 --- a/drivers/staging/comedi/drivers/ni_mio_cs.c +++ b/drivers/staging/comedi/drivers/ni_mio_cs.c @@ -56,8 +56,8 @@ See the notes in the ni_atmio.o driver. static const struct ni_board_struct ni_boards[] = { { - .device_id = 0x010d, .name = "DAQCard-ai-16xe-50", + .device_id = 0x010d, .n_adchan = 16, .adbits = 16, .ai_fifo_depth = 1024, @@ -66,8 +66,8 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { dac8800, dac8043 }, }, { - .device_id = 0x010c, .name = "DAQCard-ai-16e-4", + .device_id = 0x010c, .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 1024, @@ -76,8 +76,8 @@ static const struct ni_board_struct ni_boards[] = { .num_p0_dio_channels = 8, .caldac = { mb88341 }, /* verified */ }, { - .device_id = 0x02c4, .name = "DAQCard-6062E", + .device_id = 0x02c4, .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 8192, @@ -92,8 +92,8 @@ static const struct ni_board_struct ni_boards[] = { .caldac = { ad8804_debug }, /* verified */ }, { /* specs incorrect! */ - .device_id = 0x075e, .name = "DAQCard-6024E", + .device_id = 0x075e, .n_adchan = 16, .adbits = 12, .ai_fifo_depth = 1024, @@ -107,8 +107,8 @@ static const struct ni_board_struct ni_boards[] = { .caldac = { ad8804_debug }, }, { /* specs incorrect! */ - .device_id = 0x0245, .name = "DAQCard-6036E", + .device_id = 0x0245, .n_adchan = 16, .adbits = 16, .ai_fifo_depth = 1024, @@ -124,8 +124,8 @@ static const struct ni_board_struct ni_boards[] = { }, #if 0 { - .device_id = 0x0000, /* unknown */ .name = "DAQCard-6715", + .device_id = 0x0000, /* unknown */ .n_aochan = 8, .aobits = 12, .ao_671x = 8192, diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index 7cb591a80146..02a7fa3233e1 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -1388,9 +1388,9 @@ enum Interrupt_C_Status_Bits { #define M_SERIES_EEPROM_SIZE 1024 struct ni_board_struct { + const char *name; int device_id; int isapnp_id; - char *name; int n_adchan; int adbits;