[PATCH 04/21] staging: comedi: adl_pci9118: remove 'n_aochan' boardinfo

H Hartley Sweeten hsweeten at visionengravers.com
Thu Sep 4 17:39:25 UTC 2014


This member of the boardinfo is the same for all entries. Remove it.

Also, remove the initialization of the subdevice 'len_chanlist'. This
member is only used if the subdevice supports async commands.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/adl_pci9118.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 45fa701..558732c 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -232,7 +232,6 @@ struct boardtype {
 	int n_aichan;			/* num of A/D chans */
 	int n_aichand;			/* num of A/D chans in diff mode */
 	int n_aichanlist;		/* len of chanlist */
-	int n_aochan;			/* num of D/A chans */
 	int ai_maxdata;			/* resolution of A/D */
 	const struct comedi_lrange *rangelist_ai;	/* rangelist for A/D */
 	unsigned int ai_ns_min;		/* max sample speed of card v ns */
@@ -251,7 +250,6 @@ static const struct boardtype boardtypes[] = {
 		.n_aichan	= 16,
 		.n_aichand	= 8,
 		.n_aichanlist	= PCI9118_CHANLEN,
-		.n_aochan	= 2,
 		.ai_maxdata	= 0x0fff,
 		.rangelist_ai	= &range_pci9118dg_hr,
 		.ai_ns_min	= 3000,
@@ -263,7 +261,6 @@ static const struct boardtype boardtypes[] = {
 		.n_aichan	= 16,
 		.n_aichand	= 8,
 		.n_aichanlist	= PCI9118_CHANLEN,
-		.n_aochan	= 2,
 		.ai_maxdata	= 0x0fff,
 		.rangelist_ai	= &range_pci9118hg,
 		.ai_ns_min	= 3000,
@@ -275,7 +272,6 @@ static const struct boardtype boardtypes[] = {
 		.n_aichan	= 16,
 		.n_aichand	= 8,
 		.n_aichanlist	= PCI9118_CHANLEN,
-		.n_aochan	= 2,
 		.ai_maxdata	= 0xffff,
 		.rangelist_ai	= &range_pci9118dg_hr,
 		.ai_ns_min	= 10000,
@@ -1919,9 +1915,8 @@ static int pci9118_common_attach(struct comedi_device *dev, int disable_irq,
 	s = &dev->subdevices[1];
 	s->type = COMEDI_SUBD_AO;
 	s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
-	s->n_chan = this_board->n_aochan;
+	s->n_chan = 2;
 	s->maxdata = 0x0fff;
-	s->len_chanlist = this_board->n_aochan;
 	s->range_table = &range_bipolar10;
 	s->insn_write = pci9118_insn_write_ao;
 	s->insn_read = pci9118_insn_read_ao;
-- 
2.0.3



More information about the devel mailing list