Re: [PATCH 08/34] staging: comedi: amplc_pci224: 'ao_stop_count' is always 'stop_arg'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-09-10 00:15, H Hartley Sweeten wrote:
When the cmd->stop_src == TRIG_COUNT, the 'ao_stop_count' is the cmd->stop_arg.
For any other stop_src the 'ao_stop_count' is 0, which is also the cmd->stop_arg.

Simplify the 'ao_stop_count' initialization.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
  drivers/staging/comedi/drivers/amplc_pci224.c | 8 +-------
  1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index 3b55e71..0127d7c 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -891,13 +891,7 @@ static int pci224_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
  	if (cmd->scan_begin_src == TRIG_TIMER)
  		pci224_ao_start_pacer(dev, s);

-	/*
-	 * Sort out end of acquisition.
-	 */
-	if (cmd->stop_src == TRIG_COUNT)
-		devpriv->ao_stop_count = cmd->stop_arg;
-	else	/* TRIG_EXT | TRIG_NONE */
-		devpriv->ao_stop_count = 0;
+	devpriv->ao_stop_count = cmd->stop_arg;

  	spin_lock_irqsave(&devpriv->ao_spinlock, flags);
  	if (cmd->start_src == TRIG_INT) {


If patch 07 is dropped, this patch is still fine (apart from the description) as devpriv->ao_stop_count is only used when cmd->stop_src == TRIG_COUNT.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux