greybus: loopback: remove magic number in state-machine
Magic number 2 used instead of define GB_LOOPBACK_TYPE_PING, remove and and use the define instead. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
f9f971a2e5
commit
a0ee3d3ea6
@ -356,7 +356,7 @@ static int gb_loopback_fn(void *data)
|
||||
gb->elapsed_nsecs = timeval_to_ns(&gb->te) -
|
||||
timeval_to_ns(&gb->ts);
|
||||
gb_loopback_freq_update(gb);
|
||||
if (gb->type == 2)
|
||||
if (gb->type == GB_LOOPBACK_TYPE_PING)
|
||||
gb_loopback_bw_update(gb, error);
|
||||
gb_loopback_latency_update(gb, &tlat);
|
||||
if (gb->elapsed_nsecs >= NSEC_PER_SEC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user