Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936563AbcJFITR (ORCPT ); Thu, 6 Oct 2016 04:19:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46518 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933268AbcJFITN (ORCPT ); Thu, 6 Oct 2016 04:19:13 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ksenija Stanojevic Subject: [PATCH 4.8 04/10] Staging: fbtft: Fix bug in fbtft-core Date: Thu, 6 Oct 2016 10:18:27 +0200 Message-Id: <20161006074741.086371472@linuxfoundation.org> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161006074740.913116523@linuxfoundation.org> References: <20161006074740.913116523@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 37 4.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ksenija Stanojevic commit fc1e2c8ea85e109acf09e74789e9b852f6eed251 upstream. Commit 367e8560e8d7a62d96e9b1d644028a3816e04206 introduced a bug in fbtft-core where fps is always 0, this is because variable update_time is not assigned correctly. Signed-off-by: Ksenija Stanojevic Fixes: 367e8560e8d7 ("Staging: fbtbt: Replace timespec with ktime_t") Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fbtft-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -391,11 +391,11 @@ static void fbtft_update_display(struct if (unlikely(timeit)) { ts_end = ktime_get(); - if (ktime_to_ns(par->update_time)) + if (!ktime_to_ns(par->update_time)) par->update_time = ts_start; - par->update_time = ts_start; fps = ktime_us_delta(ts_start, par->update_time); + par->update_time = ts_start; fps = fps ? 1000000 / fps : 0; throughput = ktime_us_delta(ts_end, ts_start);