From patchwork Wed Jul 27 09:47:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1011132 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6R9ubs4026365 for ; Wed, 27 Jul 2011 09:56:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754275Ab1G0Jz6 (ORCPT ); Wed, 27 Jul 2011 05:55:58 -0400 Received: from narfation.org ([79.140.41.39]:43169 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754186Ab1G0Jzw (ORCPT ); Wed, 27 Jul 2011 05:55:52 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 27 Jul 2011 09:56:37 +0000 (UTC) X-Greylist: delayed 477 seconds by postgrey-1.27 at vger.kernel.org; Wed, 27 Jul 2011 05:55:52 EDT Received: from sven-desktop.home.narfation.org (bathseba.informatik.tu-chemnitz.de [134.109.192.185]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 2DCB094112; Wed, 27 Jul 2011 11:48:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1311760124; bh=aODxPW9zocmsluSZiI0eWyAz1/CQ+SPDV9c3cX5qKsM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=iGV8Xd27y0JAtxSAzHQoubHprOfkeNtoMzsIBATymo0RbfOXEPwg5RYcTEEKFXySt gI88U3AgPzibVGW9wvYdNB3x3rfklbXTIlaVF2lpx26Sw/Ue0Xx2atkDx0PRr1GFV7 xP3SAczeSmhkDbChsAZ3sf+JFqzZOcxi9FvXv7SI= From: Sven Eckelmann To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Sven Eckelmann , Laurent Pinchart , linux-media@vger.kernel.org Subject: [PATCHv4 05/11] omap3isp: Use *_dec_not_zero instead of *_add_unless Date: Wed, 27 Jul 2011 11:47:44 +0200 Message-Id: <1311760070-21532-5-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1311760070-21532-1-git-send-email-sven@narfation.org> References: <1311760070-21532-1-git-send-email-sven@narfation.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org atomic_dec_not_zero is defined for each architecture through to provide the functionality of atomic_add_unless(x, -1, 0). Signed-off-by: Sven Eckelmann Cc: Laurent Pinchart Cc: linux-media@vger.kernel.org Acked-by: Laurent Pinchart --- drivers/media/video/omap3isp/ispstat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/omap3isp/ispstat.c b/drivers/media/video/omap3isp/ispstat.c index b44cb68..81b1ec9 100644 --- a/drivers/media/video/omap3isp/ispstat.c +++ b/drivers/media/video/omap3isp/ispstat.c @@ -652,7 +652,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);