From a0ee3d3ea6c1b8d731ca68c78db53035862ab3ae Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Mon, 13 Jul 2015 20:20:46 +0100 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 59c437bdd58c..9ede48058666 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -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) -- 2.20.1