lkml.org 
[lkml]   [2011]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv4 05/11] omap3isp: Use *_dec_not_zero instead of *_add_unless
    Date
    atomic_dec_not_zero is defined for each architecture through
    <linux/atomic.h> to provide the functionality of
    atomic_add_unless(x, -1, 0).

    Signed-off-by: Sven Eckelmann <sven@narfation.org>
    Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Cc: linux-media@vger.kernel.org
    ---
    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);
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2011-07-27 11:59    [W:0.039 / U:118.592 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site