staging: comedi: dt2814: Remove struct dt2814_private
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@mev.co.uk> Link: https://lore.kernel.org/r/20210301165757.243065-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3d7b3101bf
commit
04b2dcca27
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user