From: Chase Southwood <chase.southwood@gmail.com>
To: gregkh@linuxfoundation.org
Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Chase Southwood <chase.southwood@gmail.com>
Subject: [PATCH 3/6 v2] staging: comedi: addi_apci_1564: board has 32 digital inputs
Date: Tue, 29 Apr 2014 03:34:23 -0500 [thread overview]
Message-ID: <1398760463-18638-1-git-send-email-chase.southwood@gmail.com> (raw)
In-Reply-To: <1398562623-5727-1-git-send-email-chase.southwood@gmail.com>
This board always has 32 digital inputs. Remove the test when
initializing the subdevice.
Also, since this board is the only one supported by this driver,
remove the boardinfo about the digital inputs and just use the
data directly in the subdevice init.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
2: Changed incorrect title.
drivers/staging/comedi/drivers/addi_apci_1564.c | 26 +++++++++----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index c84e17c..fe42f9d 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -20,8 +20,6 @@ static const struct addi_board apci1564_boardtypes[] = {
.i_Timer = 1,
.interrupt = apci1564_interrupt,
.reset = apci1564_reset,
- .di_config = apci1564_di_config,
- .di_bits = apci1564_di_insn_bits,
.do_config = apci1564_do_config,
.do_bits = apci1564_do_insn_bits,
.do_read = apci1564_do_read,
@@ -115,21 +113,15 @@ static int apci1564_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise DI Subdevice Structures */
s = &dev->subdevices[2];
- if (devpriv->s_EeParameters.i_NbrDiChannel) {
- s->type = COMEDI_SUBD_DI;
- s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
- s->n_chan = devpriv->s_EeParameters.i_NbrDiChannel;
- s->maxdata = 1;
- s->len_chanlist =
- devpriv->s_EeParameters.i_NbrDiChannel;
- s->range_table = &range_digital;
- s->insn_config = this_board->di_config;
- s->insn_read = this_board->di_read;
- s->insn_write = this_board->di_write;
- s->insn_bits = this_board->di_bits;
- } else {
- s->type = COMEDI_SUBD_UNUSED;
- }
+ s->type = COMEDI_SUBD_DI;
+ s->subdev_flags = SDF_READABLE;
+ s->n_chan = 32;
+ s->maxdata = 1;
+ s->len_chanlist = 32;
+ s->range_table = &range_digital;
+ s->insn_config = apci1564_di_config;
+ s->insn_bits = apci1564_di_insn_bits;
+
/* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[3];
if (devpriv->s_EeParameters.i_NbrDoChannel) {
--
1.9.0
next prev parent reply other threads:[~2014-04-29 8:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 1:35 [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code Chase Southwood
2014-04-27 1:36 ` [PATCH 2/6] staging: comedi: addi_apci_1564: remove unnecessary include Chase Southwood
2014-04-27 1:37 ` [PATCH 3/6] staging: comedi: addi_apci_1032: board has 32 digital inputs Chase Southwood
[not found] ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F7F8@P3PWEX4MB008.ex4.secureserver.net>
2014-04-28 21:57 ` Ian Abbott
2014-04-29 8:34 ` Chase Southwood [this message]
2014-04-29 13:15 ` [PATCH 3/6 v2] staging: comedi: addi_apci_1564: " Ian Abbott
2014-04-27 1:37 ` [PATCH 4/6] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars Chase Southwood
2014-04-28 10:19 ` Ian Abbott
2014-04-28 11:10 ` Ian Abbott
[not found] ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F7CD@P3PWEX4MB008.ex4.secureserver.net>
2014-04-29 8:22 ` Chase Southwood
2014-04-29 8:35 ` [PATCH 4/6 v2] " Chase Southwood
2014-04-29 13:19 ` Ian Abbott
2014-04-30 7:57 ` [PATCH 4/6 v3] " Chase Southwood
2014-04-30 8:47 ` Ian Abbott
2014-04-27 1:38 ` [PATCH 5/6] staging: comedi: addi_apci_2032: remove unnecessary info from boardinfo Chase Southwood
2014-04-29 8:37 ` [PATCH 5/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:17 ` Ian Abbott
2014-04-27 1:38 ` [PATCH 6/6] staging: comedi: addi_apci_2032: remove use of devpriv->s_EeParameters Chase Southwood
[not found] ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F6C5@P3PWEX4MB008.ex4.secureserver.net>
2014-04-29 8:16 ` Chase Southwood
2014-04-29 8:38 ` [PATCH 6/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:20 ` Ian Abbott
2014-04-29 20:33 ` Hartley Sweeten
2014-04-30 7:52 ` Chase Southwood
2014-04-30 16:58 ` Hartley Sweeten
2014-05-01 3:32 ` Chase Southwood
2014-05-03 7:49 ` [PATCH 6/6 v3] " Chase Southwood
2014-04-28 9:40 ` [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code Dan Carpenter
2014-05-03 23:52 ` Greg KH
2014-05-04 19:48 ` Chase Southwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398760463-18638-1-git-send-email-chase.southwood@gmail.com \
--to=chase.southwood@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).