From patchwork Wed Jul 15 01:51:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 6790951 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 813FB9F380 for ; Wed, 15 Jul 2015 01:52:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4CFA2061D for ; Wed, 15 Jul 2015 01:52:00 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6020420618 for ; Wed, 15 Jul 2015 01:51:59 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 997002657DD; Wed, 15 Jul 2015 03:51:57 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D830626572D; Wed, 15 Jul 2015 03:51:49 +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 87DD4265747; Wed, 15 Jul 2015 03:51:48 +0200 (CEST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by alsa0.perex.cz (Postfix) with ESMTP id 10DCE26571B for ; Wed, 15 Jul 2015 03:51:41 +0200 (CEST) Received: by pachj5 with SMTP id hj5so14741347pac.3 for ; Tue, 14 Jul 2015 18:51:40 -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=pG1NYvXm0sYa2iaNJWXWT5C3udfe/WTxMB62xTSkEYI=; b=TgOMBIiL2yF25VclIUc73X3/rJqXEfQcG5niLnI7jP6NYiChv3YRpjRTyJiYR9kiOH 3lH24RXGaotAvCSpxHGzCed1v92j2cDYQAGU2F4p6a7Si3JsRqJrXUZKkliFAaaFOmM6 +ARbhxmWRXhG9519NcHLVwZohfuv2jQcr34xvswbkPpcq/bWOTSn6Lj0pwB8aNRhn6O/ JpHnxgn8BuT82Qikl8Xn/AvFS0XaTXmo0mgafwJSwkQoD9jnOrOcz1K+r1HClNl0xr/4 TAkFAXLWqgHIkOHP3NsPqMY9rvJQwJnLj2zYm/B7LlrTPZ2fd104a8AG+93aQE7LkLbP 0Rzw== X-Gm-Message-State: ALoCoQn4Wu9pm/cH8KopVCaHJLkXNjPwEoKHerNR6/4XaegqFyXw8wh7yXqvg4BXH7FpTyzuIu1e X-Received: by 10.68.185.37 with SMTP id ez5mr3016492pbc.74.1436925099851; Tue, 14 Jul 2015 18:51:39 -0700 (PDT) Received: from phoenix.local ([163.26.71.6]) by smtp.gmail.com with ESMTPSA id b12sm2693047pbu.20.2015.07.14.18.51.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jul 2015 18:51:38 -0700 (PDT) Message-ID: <1436925093.19790.1.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Wed, 15 Jul 2015 09:51:33 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: Adam Thomson , Support Opensource , Michal Hajduk , alsa-devel@alsa-project.org, Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: da732x: Merge da732x_dai1_ops and da732x_dai2_ops 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 da732x_dai1_ops is identical to da732x_dai2_ops, so merge them to da732x_dai_ops. The da732x_dai_ops is not modified after initialization, so make it const. Signed-off-by: Axel Lin Acked-by: Adam Thomson --- sound/soc/codecs/da732x.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c index b1cb465..29251b0 100644 --- a/sound/soc/codecs/da732x.c +++ b/sound/soc/codecs/da732x.c @@ -1196,13 +1196,7 @@ static int da732x_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, #define DA732X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops da732x_dai1_ops = { - .hw_params = da732x_hw_params, - .set_fmt = da732x_set_dai_fmt, - .set_sysclk = da732x_set_dai_sysclk, -}; - -static struct snd_soc_dai_ops da732x_dai2_ops = { +static const struct snd_soc_dai_ops da732x_dai_ops = { .hw_params = da732x_hw_params, .set_fmt = da732x_set_dai_fmt, .set_sysclk = da732x_set_dai_sysclk, @@ -1227,7 +1221,7 @@ static struct snd_soc_dai_driver da732x_dai[] = { .rates = DA732X_RATES, .formats = DA732X_FORMATS, }, - .ops = &da732x_dai1_ops, + .ops = &da732x_dai_ops, }, { .name = "DA732X_AIFB", @@ -1247,7 +1241,7 @@ static struct snd_soc_dai_driver da732x_dai[] = { .rates = DA732X_RATES, .formats = DA732X_FORMATS, }, - .ops = &da732x_dai2_ops, + .ops = &da732x_dai_ops, }, };