From 5bacadc84bc6dc217e3b5eb2efa14902df78a143 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 31 Aug 2012 20:41:35 +0100 Subject: [PATCH] staging: comedi: das08: Avoid zero initializers in board structure 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das08.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index 8ba83690c606..78ee0beaa098 100644 --- a/drivers/staging/comedi/drivers/das08.c +++ b/drivers/staging/comedi/drivers/das08.c @@ -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 */ }, @@ -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 */ }, @@ -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 */ }, { @@ -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 */ }, @@ -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 */ }, @@ -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 @@ -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, }, @@ -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 */ @@ -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, }, }; -- 2.30.2