public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: comedi: addi_apci_1564: board does not have analog inputs
@ 2014-04-25  8:17 Chase Southwood
  2014-04-25  8:18 ` [PATCH 2/2] staging: comedi: addi_apci_1564: board does not have analog outputs Chase Southwood
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chase Southwood @ 2014-04-25  8:17 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, hsweeten, devel, linux-kernel, Chase Southwood

This board does not have analog inputs.  Remove the subdevice init for
them.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
Compile tested only.  To be applied on top of
[PATCH] staging: comedi: addi_apci_1564: separate from addi_common.c

 drivers/staging/comedi/drivers/addi_apci_1564.c | 31 +------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 792916d..eee10cc 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -144,36 +144,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
 
 	/*  Allocate and Initialise AI Subdevice Structures */
 	s = &dev->subdevices[0];
-	if ((devpriv->s_EeParameters.i_NbrAiChannel)
-		|| (this_board->i_NbrAiChannelDiff)) {
-		dev->read_subdev = s;
-		s->type = COMEDI_SUBD_AI;
-		s->subdev_flags =
-			SDF_READABLE | SDF_COMMON | SDF_GROUND
-			| SDF_DIFF;
-		if (devpriv->s_EeParameters.i_NbrAiChannel) {
-			s->n_chan =
-				devpriv->s_EeParameters.i_NbrAiChannel;
-			devpriv->b_SingelDiff = 0;
-		} else {
-			s->n_chan = this_board->i_NbrAiChannelDiff;
-			devpriv->b_SingelDiff = 1;
-		}
-		s->maxdata = devpriv->s_EeParameters.i_AiMaxdata;
-		s->len_chanlist = this_board->i_AiChannelList;
-		s->range_table = this_board->pr_AiRangelist;
-
-		s->insn_config = this_board->ai_config;
-		s->insn_read = this_board->ai_read;
-		s->insn_write = this_board->ai_write;
-		s->insn_bits = this_board->ai_bits;
-		s->do_cmdtest = this_board->ai_cmdtest;
-		s->do_cmd = this_board->ai_cmd;
-		s->cancel = this_board->ai_cancel;
-
-	} else {
-		s->type = COMEDI_SUBD_UNUSED;
-	}
+	s->type = COMEDI_SUBD_UNUSED;
 
 	/*  Allocate and Initialise AO Subdevice Structures */
 	s = &dev->subdevices[1];
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-25 16:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  8:17 [PATCH 1/2] staging: comedi: addi_apci_1564: board does not have analog inputs Chase Southwood
2014-04-25  8:18 ` [PATCH 2/2] staging: comedi: addi_apci_1564: board does not have analog outputs Chase Southwood
2014-04-25 10:20   ` Ian Abbott
2014-04-25 16:08   ` Hartley Sweeten
2014-04-25 10:18 ` [PATCH 1/2] staging: comedi: addi_apci_1564: board does not have analog inputs Ian Abbott
2014-04-25 16:07 ` Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox