From: H Hartley Sweeten Date: Tue, 3 Dec 2013 19:07:13 +0000 (-0700) Subject: staging: comedi: pcl816: remove 'sub_ai' from private data X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d6f1a2ede8060fedb6baf652cbb24ae9db25b1b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: pcl816: remove 'sub_ai' from private data This member of the private data is a duplicate of the comedi_device 'read_subdev' member. Remove the private data member and use the comedi_device member instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index ed4d57f8a1bd..6445e1fe4e5e 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -138,7 +138,6 @@ struct pcl816_private { unsigned int ai_act_chanlist_pos; /* actual position in MUX list */ unsigned int ai_n_chan; /* how many channels per scan */ unsigned int ai_poll_ptr; /* how many sampes transfer poll */ - struct comedi_subdevice *sub_ai; /* ptr to AI subdevice */ }; /* @@ -948,7 +947,6 @@ no_dma: s = &dev->subdevices[0]; if (board->n_aichan > 0) { s->type = COMEDI_SUBD_AI; - devpriv->sub_ai = s; s->subdev_flags = SDF_CMD_READ | SDF_DIFF; s->n_chan = board->n_aichan; s->maxdata = board->ai_maxdata; @@ -1003,7 +1001,7 @@ static void pcl816_detach(struct comedi_device *dev) struct pcl816_private *devpriv = dev->private; if (dev->private) { - pcl816_ai_cancel(dev, devpriv->sub_ai); + pcl816_ai_cancel(dev, dev->read_subdev); pcl816_reset(dev); if (devpriv->dma) free_dma(devpriv->dma);