Skip to content

Commit

Permalink
staging: comedi: dt2814: Remove struct dt2814_private
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ian-abbott authored and gregkh committed Mar 10, 2021
1 parent 3d7b310 commit 04b2dcc
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions drivers/staging/comedi/drivers/dt2814.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 04b2dcc

Please sign in to comment.