Skip to content

Commit

Permalink
staging: comedi: das08: Avoid zero initializers in board structure
Browse files Browse the repository at this point in the history
Don't bother initializing the `i8255_offset` and/or `i8254_offset`
members of `struct das08_board_struct` in `das08_boards[]` and
`das08_cs_boards[]` if they are zero as they are implicitly initialized
to zero anyway, and zero means the corresponding subdevices are absent.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent dd2ac5d commit 5bacadc
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions drivers/staging/comedi/drivers/das08.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ static const struct das08_board_struct das08_boards[] = {
.ai_encoding = das08_encode12,
.di_nchan = 3,
.do_nchan = 4,
.i8255_offset = 0,
.i8254_offset = 0x04,
.iosize = 16, /* unchecked */
},
Expand All @@ -536,7 +535,6 @@ static const struct das08_board_struct das08_boards[] = {
.ai_encoding = das08_encode12,
.di_nchan = 3,
.do_nchan = 4,
.i8255_offset = 0,
.i8254_offset = 0x04,
.iosize = 16, /* unchecked */
},
Expand Down Expand Up @@ -589,8 +587,6 @@ static const struct das08_board_struct das08_boards[] = {
.ao_nbits = 12,
.di_nchan = 8,
.do_nchan = 8,
.i8255_offset = 0,
.i8254_offset = 0,
.iosize = 16, /* unchecked */
},
{
Expand All @@ -603,7 +599,6 @@ static const struct das08_board_struct das08_boards[] = {
.ao_nbits = 16,
.di_nchan = 8,
.do_nchan = 8,
.i8255_offset = 0,
.i8254_offset = 0x04,
.iosize = 16, /* unchecked */
},
Expand All @@ -615,7 +610,6 @@ static const struct das08_board_struct das08_boards[] = {
.ai_encoding = das08_encode12,
.di_nchan = 3,
.do_nchan = 4,
.i8255_offset = 0,
.i8254_offset = 4,
.iosize = 16, /* unchecked */
},
Expand All @@ -636,8 +630,6 @@ static const struct das08_board_struct das08_boards[] = {
.ai_encoding = das08_encode16,
.di_nchan = 8,
.do_nchan = 8,
.i8255_offset = 0,
.i8254_offset = 0,
.iosize = 16, /* unchecked */
},
#if 0
Expand All @@ -659,7 +651,6 @@ static const struct das08_board_struct das08_boards[] = {
.ai_encoding = das08_encode12,
.di_nchan = 3,
.do_nchan = 4,
.i8255_offset = 0,
.i8254_offset = 4,
.iosize = 8,
},
Expand All @@ -683,8 +674,6 @@ struct das08_board_struct das08_cs_boards[NUM_DAS08_CS_BOARDS] = {
.ai_encoding = das08_pcm_encode12,
.di_nchan = 3,
.do_nchan = 3,
.i8255_offset = 0,
.i8254_offset = 0,
.iosize = 16,
},
/* duplicate so driver name can be used also */
Expand All @@ -697,8 +686,6 @@ struct das08_board_struct das08_cs_boards[NUM_DAS08_CS_BOARDS] = {
.ai_encoding = das08_pcm_encode12,
.di_nchan = 3,
.do_nchan = 3,
.i8255_offset = 0,
.i8254_offset = 0,
.iosize = 16,
},
};
Expand Down

0 comments on commit 5bacadc

Please sign in to comment.