[PATCH 5/6] staging: comedi: dt2814: Remove struct dt2814_private
Ian Abbott
abbotti at mev.co.uk
Mon Mar 1 16:57:56 UTC 2021
The `ntrig` member of the `struct dt2814_private` pointed to by
`dev->private` is no longer used as a counter to determine the end of
acquisition for a Comedi asynchronous command. The other member
`curadscan` is also unused. Remove the allocation of the private data
during initialization and remove the definition of `struct
dt2814_private` since they are no longer needed.
Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
---
drivers/staging/comedi/drivers/dt2814.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
index 6f6d0b2bb44b..d18f9a5a9fb1 100644
--- a/drivers/staging/comedi/drivers/dt2814.c
+++ b/drivers/staging/comedi/drivers/dt2814.c
@@ -44,11 +44,6 @@
#define DT2814_ENB 0x10
#define DT2814_CHANMASK 0x0f
-struct dt2814_private {
- int ntrig;
- int curadchan;
-};
-
#define DT2814_TIMEOUT 10
#define DT2814_MAX_SPEED 100000 /* Arbitrary 10 khz limit */
@@ -207,7 +202,6 @@ static int dt2814_ai_cmdtest(struct comedi_device *dev,
static int dt2814_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
- struct dt2814_private *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd;
int chan;
int trigvar;
@@ -217,7 +211,6 @@ static int dt2814_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
chan = CR_CHAN(cmd->chanlist[0]);
- devpriv->ntrig = cmd->stop_arg;
outb(chan | DT2814_ENB | (trigvar << 5), dev->iobase + DT2814_CSR);
return 0;
@@ -310,7 +303,6 @@ static irqreturn_t dt2814_interrupt(int irq, void *d)
static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
- struct dt2814_private *devpriv;
struct comedi_subdevice *s;
int ret;
@@ -335,10 +327,6 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret)
return ret;
- devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
- if (!devpriv)
- return -ENOMEM;
-
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
--
2.30.0
More information about the devel
mailing list