From: H Hartley Sweeten Date: Mon, 14 Jul 2014 19:23:49 +0000 (-0700) Subject: staging: comedi: ni_mio_common: remove ai_continuous from private data X-Git-Tag: v3.17-rc1~123^2~683 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=93fac790668ca6e0151b590385a48360cf521c31;p=karo-tx-linux.git staging: comedi: ni_mio_common: remove ai_continuous from private data This member of the private data can be determined by checking the cmd->stop_src. Do that instead and remove the member. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 9bcf8351129d..1718382a7e7c 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -1499,8 +1499,8 @@ static void ack_a_interrupt(struct comedi_device *dev, unsigned short a_status) static void handle_a_interrupt(struct comedi_device *dev, unsigned short status, unsigned ai_mite_status) { - struct ni_private *devpriv = dev->private; struct comedi_subdevice *s = dev->read_subdev; + struct comedi_cmd *cmd = &s->async->cmd; /* 67xx boards don't have ai subdevice, but their gpct0 might generate an a interrupt */ if (s->type == COMEDI_SUBD_UNUSED) @@ -1551,7 +1551,7 @@ static void handle_a_interrupt(struct comedi_device *dev, unsigned short status, return; } if (status & AI_SC_TC_St) { - if (!devpriv->ai_continuous) + if (cmd->stop_src == TRIG_COUNT) shutdown_ai_command(dev); } } @@ -2513,7 +2513,6 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* load SC (Scan Count) */ ni_stc_writew(dev, AI_SC_Load, AI_Command_1_Register); - devpriv->ai_continuous = 0; if (stop_count == 0) { devpriv->ai_cmd2 |= AI_End_On_End_Of_Scan; interrupt_a_enable |= AI_STOP_Interrupt_Enable; @@ -2532,9 +2531,6 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* load SC (Scan Count) */ ni_stc_writew(dev, AI_SC_Load, AI_Command_1_Register); - - devpriv->ai_continuous = 1; - break; } diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index 2b937d37ae9b..6f9c4811e231 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -1422,7 +1422,6 @@ struct ni_private { unsigned short dio_output; unsigned short dio_control; int aimode; - int ai_continuous; unsigned int ai_calib_source; unsigned int ai_calib_source_enabled; spinlock_t window_lock;