staging: line6: Fix checkpatch errors in capture.c
authorShawn Bohrer <shawn.bohrer@gmail.com>
Mon, 16 Nov 2009 04:17:53 +0000 (22:17 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 20:21:47 +0000 (12:21 -0800)
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/line6/capture.c

index 7009f395a2372faf811e67b96b1d8b8e5b06366b..fd4890de8dbcd3cf6837099d29d5fa608ec5d40c 100644 (file)
@@ -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);
                }