From 0615c162f659fb96cbb97dfb2a0a315eecb7861f Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 14 Jul 2014 12:23:57 -0700 Subject: staging: comedi: ni_mio_common: refactor 'num_p0_dio_channels' boardinfo All of the board supported by this driver have at least 8 Digital I/O channels. A couple of the PCI boards in ni_pcimio have 32 channels. For aesthetics, change this member of the boardinfo into a bit-field flag, 'has_32dio_chan', and use that when initializing the DIO subdevice to set the number of channels to 32 or 8. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_atmio.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/staging/comedi/drivers/ni_atmio.c') diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 38580619d841..c61342342db4 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -117,7 +117,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_fifo_depth = 2048, .ao_range_table = &range_ni_E_ao_ext, .ao_speed = 1000, - .num_p0_dio_channels = 8, .caldac = { mb88341 }, }, { .name = "at-mio-16e-2", @@ -133,7 +132,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_fifo_depth = 2048, .ao_range_table = &range_ni_E_ao_ext, .ao_speed = 1000, - .num_p0_dio_channels = 8, .caldac = { mb88341 }, }, { .name = "at-mio-16e-10", @@ -148,7 +146,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_maxdata = 0x0fff, .ao_range_table = &range_ni_E_ao_ext, .ao_speed = 10000, - .num_p0_dio_channels = 8, .caldac = { ad8804_debug }, }, { .name = "at-mio-16de-10", @@ -163,7 +160,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_maxdata = 0x0fff, .ao_range_table = &range_ni_E_ao_ext, .ao_speed = 10000, - .num_p0_dio_channels = 8, .caldac = { ad8804_debug }, .has_8255 = 1, }, { @@ -180,7 +176,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_fifo_depth = 2048, .ao_range_table = &range_ni_E_ao_ext, .ao_speed = 1000, - .num_p0_dio_channels = 8, .caldac = { ad8804_debug }, }, { .name = "at-mio-16xe-50", @@ -196,7 +191,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_maxdata = 0x0fff, .ao_range_table = &range_bipolar10, .ao_speed = 50000, - .num_p0_dio_channels = 8, .caldac = { dac8800, dac8043 }, }, { .name = "at-mio-16xe-10", @@ -213,7 +207,6 @@ static const struct ni_board_struct ni_boards[] = { .ao_fifo_depth = 2048, .ao_range_table = &range_ni_E_ao_ext, .ao_speed = 1000, - .num_p0_dio_channels = 8, .caldac = { dac8800, dac8043, ad8522 }, }, { .name = "at-ai-16xe-10", @@ -225,7 +218,6 @@ static const struct ni_board_struct ni_boards[] = { .alwaysdither = 1, /* unknown */ .gainlkup = ai_gain_14, .ai_speed = 10000, - .num_p0_dio_channels = 8, .caldac = { dac8800, dac8043, ad8522 }, }, }; -- cgit v1.2.3