* [PATCH 18/33] staging: comedi: cb_das16_cs: remove unused timer subdevice
@ 2012-06-25 23:59 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-06-25 23:59 UTC (permalink / raw)
To: Linux Kernel; +Cc: abbotti, fmhess, gregkh
The timer subdevice is never initialized due to the 'if (0)'. The
comedi callbacks also don't do anything and just return -EINVAL.
Remove the subdevice and associated code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/comedi/drivers/cb_das16_cs.c | 32 +---------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c
index 36fd3e6..b0a2223 100644
--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
+++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
@@ -425,21 +425,6 @@ static int das16cs_dio_insn_config(struct comedi_device *dev,
return insn->n;
}
-static int das16cs_timer_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
-{
- return -EINVAL;
-}
-
-static int das16cs_timer_insn_config(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn,
- unsigned int *data)
-{
- return -EINVAL;
-}
-
static const struct das16cs_board *das16cs_probe(struct comedi_device *dev,
struct pcmcia_device *link)
{
@@ -497,7 +482,7 @@ static int das16cs_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct das16cs_private)) < 0)
return -ENOMEM;
- ret = comedi_alloc_subdevices(dev, 4);
+ ret = comedi_alloc_subdevices(dev, 3);
if (ret)
return ret;
@@ -540,21 +525,6 @@ static int das16cs_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_UNUSED;
}
- s = dev->subdevices + 3;
- /* timer subdevice */
- if (0) {
- s->type = COMEDI_SUBD_TIMER;
- s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
- s->n_chan = 1;
- s->maxdata = 0xff;
- s->range_table = &range_unknown;
- s->insn_read = das16cs_timer_insn_read;
- s->insn_config = das16cs_timer_insn_config;
- } else {
- s->type = COMEDI_SUBD_UNUSED;
- }
-
-
return 1;
}
--
1.7.11
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-25 23:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-25 23:59 [PATCH 18/33] staging: comedi: cb_das16_cs: remove unused timer subdevice H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®