From patchwork Sun Jul 5 02:29:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 34076 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n652UQSO010092 for ; Sun, 5 Jul 2009 02:30:27 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n652UL6Y005838 for ; Sat, 4 Jul 2009 21:30:26 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n652UK8S025028 for ; Sat, 4 Jul 2009 21:30:20 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 0CCC980632 for ; Sat, 4 Jul 2009 21:30:18 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id B8A748062A for ; Sat, 4 Jul 2009 21:30:10 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id n652UAoi008504 for ; Sat, 4 Jul 2009 21:30:10 -0500 (CDT) Received: from mail10-tx2-R.bigfish.com (mail-tx2.bigfish.com [65.55.88.111]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id n652U4b5001413 for ; Sat, 4 Jul 2009 21:30:10 -0500 Received: from mail10-tx2 (localhost.localdomain [127.0.0.1]) by mail10-tx2-R.bigfish.com (Postfix) with ESMTP id C25BEBA015E for ; Sun, 5 Jul 2009 02:30:04 +0000 (UTC) X-SpamScore: 0 X-BigFish: vps0(zzzz1202hzzz2dh61h) X-Spam-TCS-SCL: 0:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 63.231.195.114; Service: EHS Received: by mail10-tx2 (MessageSwitch) id 124676100382839_539; Sun, 5 Jul 2009 02:30:03 +0000 (UCT) Received: from mpls-qmqp-03.inet.qwest.net (mpls-qmqp-03.inet.qwest.net [63.231.195.114]) by mail10-tx2.bigfish.com (Postfix) with ESMTP id 04BC8172804E for ; Sun, 5 Jul 2009 02:30:03 +0000 (UTC) Received: from localhost (unknown [67.42.45.38]) by mpls-qmqp-03.inet.qwest.net (Postfix) with ESMTP id 7F280621E09; Sun, 5 Jul 2009 02:29:59 +0000 (UTC) Received: by localhost (Postfix, from userid 1002) id AE0C85882E4; Sat, 4 Jul 2009 19:30:01 -0700 (MST) From: Troy Kisky To: alsa-devel@alsa-project.org Date: Sat, 4 Jul 2009 19:29:54 -0700 Message-Id: <1246761001-21982-5-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.5.6.3 In-Reply-To: <1246761001-21982-4-git-send-email-troy.kisky@boundarydevices.com> References: <1246761001-21982-1-git-send-email-troy.kisky@boundarydevices.com> <1246761001-21982-2-git-send-email-troy.kisky@boundarydevices.com> <1246761001-21982-3-git-send-email-troy.kisky@boundarydevices.com> <1246761001-21982-4-git-send-email-troy.kisky@boundarydevices.com> Cc: davinci-linux-open-source@linux.davincidsp.com, broonie@sirena.org.uk Subject: [PATCH V1 04/11] ASoC: DaVinci: i2s cleanup X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Move variable declaration closer to use. Signed-off-by: Troy Kisky --- sound/soc/davinci/davinci-i2s.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index f7d7e4c..73a0fd8 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -138,7 +138,6 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev, struct snd_soc_platform *platform = socdev->card->platform; int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); u32 spcr; - int ret; u32 mask = playback ? DAVINCI_MCBSP_SPCR_XRST : DAVINCI_MCBSP_SPCR_RRST; spcr = davinci_mcbsp_read_reg(dev, DAVINCI_MCBSP_SPCR_REG); if (spcr & mask) { @@ -155,7 +154,7 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev, /* Stop the DMA to avoid data loss */ /* while the transmitter is out of reset to handle XSYNCERR */ if (platform->pcm_ops->trigger) { - ret = platform->pcm_ops->trigger(substream, + int ret = platform->pcm_ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP); if (ret < 0) printk(KERN_DEBUG "Playback DMA stop failed\n"); @@ -177,7 +176,7 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev, /* Restart the DMA */ if (platform->pcm_ops->trigger) { - ret = platform->pcm_ops->trigger(substream, + int ret = platform->pcm_ops->trigger(substream, SNDRV_PCM_TRIGGER_START); if (ret < 0) printk(KERN_DEBUG "Playback DMA start failed\n");