summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-11-23 18:17:40 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-21 13:58:42 (GMT)
commitef2c83262a989dc20268dc25d4ce3725ac9d7886 (patch)
tree9cc99a23deea34c74d24d93b74516ba4fbb31271 /drivers
parent1bc05e77db1b0c2f5ec3917a9b21d64c01342b5f (diff)
downloadlinux-fsl-qoriq-ef2c83262a989dc20268dc25d4ce3725ac9d7886.tar.xz
[media] s5p-csis: Correct the event counters logging
The counter field is unsigned so >= 0 condition always evaluates to true. Fix this to log events for which counter is > 0 or for all when in debug mode. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/s5p-fimc/mipi-csis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c
index 4c961b1..9528ee6 100644
--- a/drivers/media/platform/s5p-fimc/mipi-csis.c
+++ b/drivers/media/platform/s5p-fimc/mipi-csis.c
@@ -401,12 +401,12 @@ static void s5pcsis_log_counters(struct csis_state *state, bool non_errors)
spin_lock_irqsave(&state->slock, flags);
- for (i--; i >= 0; i--)
- if (state->events[i].counter >= 0)
+ for (i--; i >= 0; i--) {
+ if (state->events[i].counter > 0 || debug)
v4l2_info(&state->sd, "%s events: %d\n",
state->events[i].name,
state->events[i].counter);
-
+ }
spin_unlock_irqrestore(&state->slock, flags);
}