[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20170130185437.22692-1-fabf@skynet.be>
Date: Mon, 30 Jan 2017 19:54:37 +0100
From: Fabian Frederick <fabf@...net.be>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, kyungmin.park@...sung.com,
linux-media@...r.kernel.org, Fabian Frederick <fabf@...net.be>
Subject: [PATCH 04/14] m5mols: use atomic_dec_not_zero()
instead of atomic_add_unless(value, -1, 0)
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
drivers/media/i2c/m5mols/m5mols_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c
index acb804b..3aab2ca 100644
--- a/drivers/media/i2c/m5mols/m5mols_core.c
+++ b/drivers/media/i2c/m5mols/m5mols_core.c
@@ -337,7 +337,7 @@ int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 irq_mask, u32 timeout)
struct m5mols_info *info = to_m5mols(sd);
int ret = wait_event_interruptible_timeout(info->irq_waitq,
- atomic_add_unless(&info->irq_done, -1, 0),
+ atomic_dec_not_zero(&info->irq_done),
msecs_to_jiffies(timeout));
if (ret <= 0)
return ret ? ret : -ETIMEDOUT;
--
2.9.3
Powered by blists - more mailing lists