From: Fabian Frederick <fabf@skynet.be>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, kyungmin.park@samsung.com,
linux-media@vger.kernel.org, Fabian Frederick <fabf@skynet.be>
Subject: [PATCH 04/14] m5mols: use atomic_dec_not_zero()
Date: Mon, 30 Jan 2017 19:54:37 +0100 [thread overview]
Message-ID: <20170130185437.22692-1-fabf@skynet.be> (raw)
instead of atomic_add_unless(value, -1, 0)
Signed-off-by: Fabian Frederick <fabf@skynet.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
reply other threads:[~2017-01-30 18:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170130185437.22692-1-fabf@skynet.be \
--to=fabf@skynet.be \
--cc=akpm@linux-foundation.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).