patch "staging: comedi: fix comedi_nsamples_left." added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: comedi: fix comedi_nsamples_left.
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
a42ae5905140c324362fe5036ae1dbb16e4d359cMon Sep 17 00:00:00 2001
From: Frank Mori Hess <[email protected]>
Date: Thu, 15 Feb 2018 15:13:42 -0500
Subject: staging: comedi: fix comedi_nsamples_left.
A rounding error was causing comedi_nsamples_left to return the wrong value when nsamples was not a multiple of the scan length.
--- drivers/staging/comedi/drivers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/comedi/drivers.c +1 -2
@@ -475,8 +475,7 @@ unsigned int comedi_nsamples_left(struct comedi_subdevice *s,struct comedi_cmd *cmd = &async->cmd;if (cmd->stop_src ==TRIG_COUNT ) { -unsigned int nscans = nsamples / cmd->scan_end_arg; -unsigned int scans_left =__comedi_nscans_left (s, nscans); +unsigned int scans_left =__comedi_nscans_left (s, cmd->stop_arg);unsigned int scan_pos =comedi_bytes_to_samples (s, async->scan_progress);unsigned long long samples_left =0 ;
Signature · 1 line
2.16.2