From patchwork Thu Jun 25 09:01:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 6672771 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E609C9F39B for ; Thu, 25 Jun 2015 09:01:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D0F12053D for ; Thu, 25 Jun 2015 09:01:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 459E22053B for ; Thu, 25 Jun 2015 09:01:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 26A472604EB; Thu, 25 Jun 2015 11:01:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id F2DF02604A7; Thu, 25 Jun 2015 11:01:28 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A771E2604AE; Thu, 25 Jun 2015 11:01:28 +0200 (CEST) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by alsa0.perex.cz (Postfix) with ESMTP id 71E19260499 for ; Thu, 25 Jun 2015 11:01:21 +0200 (CEST) Received: by pdbep18 with SMTP id ep18so27547582pdb.1 for ; Thu, 25 Jun 2015 02:01:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=b+R8BqDuFSGlkoebbzrHIiQX6Ax8jWIaDoeKlxZDieI=; b=TC+X1sGSE4jxwsZKgyi6lc/DUKwUT2Pg2DVlFtqsMIi46NHMwZIlov+O5CF9nzPCRH gdWALOzxGeVBg3daeE2px4REHpZpvypRFpbuIRfuAa56nloXp4pHqdIn8gR21BuWlqIa DiNsP4fhCPG6c69g7E+GSWW0RxQ/0JgXrPbTQlj7zxmNyD3qn2Nx/n/OUgaMPL0Sj+tj 6jFbgtwz9n80gcBRfJJQVgamnXLQH7s9ryaedKc+3S3xgs6/EBCh+5OCV1SSOY+tTu3q OVqQ8EO9xUJVXsz73wpc/pmbZ9SRHcsJlUHGoqnpP+3jp2hg+EVWM8YCg3CE+/dfNb+6 NQqg== X-Gm-Message-State: ALoCoQkZGUKO8g8izqB9/pU4aH5FFuD0ORCMiUTV1yfrC1D+ta4yD7n3TmHP8Hi/DOMnHOtTnfUj X-Received: by 10.70.62.66 with SMTP id w2mr16085064pdr.106.1435222879842; Thu, 25 Jun 2015 02:01:19 -0700 (PDT) Received: from phoenix.local (36-239-240-88.dynamic-ip.hinet.net. [36.239.240.88]) by mx.google.com with ESMTPSA id on3sm20925191pbc.48.2015.06.25.02.01.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 02:01:18 -0700 (PDT) Message-ID: <1435222874.22996.1.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Thu, 25 Jun 2015 17:01:14 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: Vishwas A Deshpande , M R Swami Reddy , alsa-devel@alsa-project.org, Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: lm49453: Remove fs_rate from struct lm49453_priv X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP fs_rate is only used in lm49453_hw_params() so don't need to store it in private data. Signed-off-by: Axel Lin --- sound/soc/codecs/lm49453.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c index 6600aa0..5b4086d 100644 --- a/sound/soc/codecs/lm49453.c +++ b/sound/soc/codecs/lm49453.c @@ -188,7 +188,6 @@ static struct reg_default lm49453_reg_defs[] = { /* codec private data */ struct lm49453_priv { struct regmap *regmap; - int fs_rate; }; /* capture path controls */ @@ -1112,13 +1111,10 @@ static int lm49453_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_codec *codec = dai->codec; - struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec); u16 clk_div = 0; - lm49453->fs_rate = params_rate(params); - /* Setting DAC clock dividers based on substream sample rate. */ - switch (lm49453->fs_rate) { + switch (params_rate(params)) { case 8000: case 16000: case 32000: