summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>2016-10-02 17:42:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-07 15:03:20 +0200
commite87e0de4b547310081fa1999b9405f81d8875e9d (patch)
treeff8738e8895c8cb57f35749910ed8bf46a29de1d /drivers
parent540ce809d333a4579a61146777b0bea4c3263e31 (diff)
downloadlwn-e87e0de4b547310081fa1999b9405f81d8875e9d.tar.gz
lwn-e87e0de4b547310081fa1999b9405f81d8875e9d.zip
Staging: fbtft: Fix bug in fbtft-core
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 <ksenija.stanojevic@gmail.com> Fixes: 367e8560e8d7 ("Staging: fbtbt: Replace timespec with ktime_t") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/fbtft/fbtft-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 0c1a77cafe14..4c281df16816 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -391,11 +391,11 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned start_line,
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);