linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/14] omap3isp: use atomic_dec_not_zero()
@ 2017-01-30 18:54 Fabian Frederick
  0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2017-01-30 18:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Laurent Pinchart, linux-media, Fabian Frederick

instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/media/platform/omap3isp/ispstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 47cbc7e..462b1d1 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -620,7 +620,7 @@ static int isp_stat_buf_process(struct ispstat *stat, int buf_state)
 {
 	int ret = STAT_NO_BUF;
 
-	if (!atomic_add_unless(&stat->buf_err, -1, 0) &&
+	if (!atomic_dec_not_zero(&stat->buf_err) &&
 	    buf_state == STAT_BUF_DONE && stat->state == ISPSTAT_ENABLED) {
 		ret = isp_stat_buf_queue(stat);
 		isp_stat_buf_next(stat);
-- 
2.9.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-30 19:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 18:54 [PATCH 05/14] omap3isp: use atomic_dec_not_zero() Fabian Frederick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).