From: Bryan O'Donoghue Date: Mon, 13 Jul 2015 19:20:46 +0000 (+0100) Subject: greybus: loopback: remove magic number in state-machine X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0ee3d3ea6c1b8d731ca68c78db53035862ab3ae;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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)