greybus: loopback: functionally decompose calculation of turn-around times
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tue, 11 Aug 2015 12:50:53 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 03:06:58 +0000 (20:06 -0700)
commit4c192665f0183150cff38b6954687752f3461e13
tree1479dcf1fcbed5b45d42f3c2904a67befd89c740
parent3f2a809e8b4c69f61de17c3efe144b9dba23924b
greybus: loopback: functionally decompose calculation of turn-around times

We have a pattern similar to this over and over again gb->elapsed_nsecs =
timeval_to_ns(&te) - timeval_to_ns(&ts); good software practice dictates we
functionally decompose this. This patch decomposes into
gb_loopback_calc_latency().

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c