summaryrefslogtreecommitdiff
path: root/drivers/staging/line6/capture.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-09-21 16:58:00 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-21 16:58:00 -0700
commit027360c5644b59d99db30e3515a8ec72350207b9 (patch)
tree2d5f307fec534fc6e76135121e4c1f8f517d6922 /drivers/staging/line6/capture.c
parent79be7254ebd2fb6d5f91b4b8e5d12cfe4fd7ecd7 (diff)
Staging: line6: minor coding style cleanups
This fixes up all of the remaining coding style issues that make any sense to make in the line6 driver. Cc: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/line6/capture.c')
-rw-r--r--drivers/staging/line6/capture.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c
index 06a6db889fbd..1e3bb1406331 100644
--- a/drivers/staging/line6/capture.c
+++ b/drivers/staging/line6/capture.c
@@ -164,15 +164,19 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize)
len * bytes_per_frame);
memcpy(runtime->dma_area, fbuf + len * bytes_per_frame,
(frames - len) * bytes_per_frame);
- } else
- dev_err(line6pcm->line6->ifcdev, "driver bug: len = %d\n", len); /* this is somewhat paranoid */
+ } else {
+ /* this is somewhat paranoid */
+ dev_err(line6pcm->line6->ifcdev,
+ "driver bug: len = %d\n", len);
+ }
} else {
/* copy single chunk */
memcpy(runtime->dma_area +
line6pcm->pos_in_done * bytes_per_frame, fbuf, fsize);
}
- 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;
}
@@ -181,15 +185,16 @@ void line6_capture_check_period(struct snd_line6_pcm *line6pcm, int length)
struct snd_pcm_substream *substream =
get_substream(line6pcm, SNDRV_PCM_STREAM_CAPTURE);
- 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);
}
}
/*
- Callback for completed capture URB.
-*/
+ * Callback for completed capture URB.
+ */
static void audio_in_callback(struct urb *urb)
{
int i, index, length = 0, shutdown = 0;