[PATCH 07/21] staging: comedi: das08: Avoid zero initializers in board structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't bother initializing the `i8255_offset` and/or `i8255_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@xxxxxxxxx>
---
 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 6ad4b9f..0d4a0cf 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,
 	},
 };
-- 
1.7.12

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux