greybus: loopback: Fix calculations error for ping transfers
authorAlexandre Bailon <abailon@baylibre.com>
Thu, 25 Feb 2016 17:19:13 +0000 (18:19 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 26 Feb 2016 01:05:31 +0000 (17:05 -0800)
For the async ping transfer, statistics are counted twice,
once after the after the gb_loopback_async_operation() and
once in the callback.
Only keep the one in the callback.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reported-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c

index f3ae2e9..b40c95e 100644 (file)
@@ -969,7 +969,6 @@ static int gb_loopback_fn(void *data)
                if (gb->async) {
                        if (type == GB_LOOPBACK_TYPE_PING) {
                                error = gb_loopback_async_ping(gb);
-                               gb_loopback_calculate_stats(gb);
                        } else if (type == GB_LOOPBACK_TYPE_TRANSFER) {
                                error = gb_loopback_async_transfer(gb, size);
                        } else if (type == GB_LOOPBACK_TYPE_SINK) {