greybus: loopback: compute average stats on demand only

Stop recording and updating the average every time a sample
is recorded.  Instead, compute it from the sum and count only
when it's required.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
1 file changed
tree: e45903c17f8a3d2365188f9ede1c4ac360393808
  1. drivers/