From patchwork Thu Jun 23 14:57:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Adam M. Dutko" X-Patchwork-Id: 909072 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5NEw8VZ016199 for ; Thu, 23 Jun 2011 14:58:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759359Ab1FWO6G (ORCPT ); Thu, 23 Jun 2011 10:58:06 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:33771 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757947Ab1FWO6F (ORCPT ); Thu, 23 Jun 2011 10:58:05 -0400 Received: by mail-gx0-f174.google.com with SMTP id 21so800751gxk.19 for ; Thu, 23 Jun 2011 07:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to:cc :content-type; bh=GYk83pSUlkO4Ne4lEjC+Rj9GB66Ic/X0nTED0Ff+Hwo=; b=D8MSm1KI2zBPWzUFVZy7W0M+UH6ARFh1PgJNitJvqvqJ6BjwQ51Vf9MBykFr21TQ+6 4eG/v3SusL9eW7XWOBg/XAOA01PoKnfwFDii8mYrCO3ZJviOG/3Znigy5zz9/5/cr+AT nqDbmMmBd6vde+ENAkJCxWLO4P+J8MA/Qrl+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=h/v2/S1Nwvq0pwPzD4S4Nvx11zQGt0XLcviSPhfs2HRRhT+WpDfG1yV3hmOCeGQ/Xj Uo9vsg3AOYb3KpSXqsuV/LNYNXbKjWX44P+FEODuOfk3T5gZ9n3J7MEIzSU+gHnV5xMG GedkqjqLUHoyLUatMGOWbWPUDfk3RGYLvB+2w= Received: by 10.150.74.2 with SMTP id w2mr2373935yba.335.1308841085092; Thu, 23 Jun 2011 07:58:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.199.10 with HTTP; Thu, 23 Jun 2011 07:57:45 -0700 (PDT) From: "Adam M. Dutko" Date: Thu, 23 Jun 2011 10:57:45 -0400 Message-ID: Subject: [PATCH] [media] TM6000: alsa: Clean up kernel coding style errors. To: mchehab@redhat.com Cc: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 23 Jun 2011 14:58:09 +0000 (UTC) There were several coding style errors as reported by checkpatch.pl. This patch should fix those errors with the single exception of the open square bracket issue on line 45. Signed-off-by: Adam M. Dutko --- drivers/staging/tm6000/tm6000-alsa.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) @@ -123,6 +122,7 @@ static int dsp_buffer_alloc(struct snd_pcm_substream *substream, int size) if (substream->runtime->dma_area) { if (substream->runtime->dma_bytes > size) return 0; + dsp_buffer_free(substream); } @@ -152,9 +152,9 @@ static struct snd_pcm_hardware snd_tm6000_digital_hw = { SNDRV_PCM_INFO_MMAP_VALID, .formats = SNDRV_PCM_FMTBIT_S16_LE, - .rates = SNDRV_PCM_RATE_CONTINUOUS, - .rate_min = 48000, - .rate_max = 48000, + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .rate_min = 48000, + .rate_max = 48000, .channels_min = 2, .channels_max = 2, .period_bytes_min = 64, @@ -254,9 +254,9 @@ static int tm6000_fillbuf(struct tm6000_core *core, char *buf, int size) memcpy(runtime->dma_area + buf_pos * stride, buf, length * stride); -#ifndef NO_PCM_LOCK - snd_pcm_stream_lock(substream); -#endif + #ifndef NO_PCM_LOCK + snd_pcm_stream_lock(substream); + #endif chip->buf_pos += length; if (chip->buf_pos >= runtime->buffer_size) @@ -268,9 +268,9 @@ static int tm6000_fillbuf(struct tm6000_core *core, char *buf, int size) period_elapsed = 1; } -#ifndef NO_PCM_LOCK - snd_pcm_stream_unlock(substream); -#endif + #ifndef NO_PCM_LOCK + snd_pcm_stream_unlock(substream); + #endif if (period_elapsed) snd_pcm_period_elapsed(substream); @@ -461,7 +461,7 @@ int tm6000_audio_init(struct tm6000_core *dev) if (rc < 0) goto error_chip; - dprintk(1,"Registered audio driver for %s\n", card->longname); + dprintk(1, "Registered audio driver for %s\n", card->longname); return 0; diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index 2b96047..679aa8f 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -84,7 +84,6 @@ static int _tm6000_start_audio_dma(struct snd_tm6000_card *chip) tm6000_set_audio_bitrate(core, 48000); - return 0; }