From dad71f5c3410beaa0ea0441eb5e820477b67a385 Mon Sep 17 00:00:00 2001 From: Shawn Bohrer Date: Sun, 15 Nov 2009 22:17:53 -0600 Subject: [PATCH] --- yaml --- r: 175048 b: refs/heads/master c: df30c0f0730647f428e54bd0305246292a5cdcb2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/line6/capture.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1745ed43af17..ca7186ee8450 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0645d634666ec6c9970d0addb5982788e13e435 +refs/heads/master: df30c0f0730647f428e54bd0305246292a5cdcb2 diff --git a/trunk/drivers/staging/line6/capture.c b/trunk/drivers/staging/line6/capture.c index 7009f395a237..fd4890de8dbc 100644 --- a/trunk/drivers/staging/line6/capture.c +++ b/trunk/drivers/staging/line6/capture.c @@ -219,8 +219,8 @@ static void audio_in_callback(struct urb *urb) fbuf, fsize * bytes_per_frame); } - if ((line6pcm->pos_in_done += - frames) >= runtime->buffer_size) + line6pcm->pos_in_done += frames; + if (line6pcm->pos_in_done >= runtime->buffer_size) line6pcm->pos_in_done -= runtime->buffer_size; } } @@ -235,7 +235,8 @@ static void audio_in_callback(struct urb *urb) if (!shutdown) { submit_audio_in_urb(substream); - if ((line6pcm->bytes_in += length) >= line6pcm->period_in) { + line6pcm->bytes_in += length; + if (line6pcm->bytes_in >= line6pcm->period_in) { line6pcm->bytes_in -= line6pcm->period_in; snd_pcm_period_elapsed(substream); }