From patchwork Fri May 24 10:39:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 17191 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7732C238FC for ; Fri, 24 May 2013 10:40:30 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id t59sf1568665yho.9 for ; Fri, 24 May 2013 03:39:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=7h0nBHODJl0HfXH0x5NowKAmjby2miERDbbiqtkbHDc=; b=Cj4VioyARKGifIb7EVmJfCf93ucEGsXRclm2OOFKh0gX5qH4CFHxfMFNN2I7S6owrp qwpUVBZzBopwiTvSWiPYvkuIbE1F2ZX5KdW8KHZ/WABx8X+LRNeSElhDqKvvTFG4H0ke 0/9ZrbIYnRZdbHrxNXXUFDbVKLQqVMnF3yfrtrRZ6hybw6Owr661PPXw3+4uNMGw6eef I6moileKg0NrXEgRXB73pfUNkAf5NVQ26grR2A59WMQcHD9hffLY3swM4Nj/Vflj/e4z sOM8qMkPdGga74KbiMQI8f7iMj1Zr6iIBvWB9q+kMs5UkTeGVAOMg+6LzWxX6cQjGp3b RAQg== X-Received: by 10.224.59.205 with SMTP id m13mr8357329qah.7.1369391973295; Fri, 24 May 2013 03:39:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.41.7 with SMTP id b7ls1745031qel.12.gmail; Fri, 24 May 2013 03:39:33 -0700 (PDT) X-Received: by 10.52.89.3 with SMTP id bk3mr6911021vdb.21.1369391973171; Fri, 24 May 2013 03:39:33 -0700 (PDT) Received: from mail-vb0-x22d.google.com (mail-vb0-x22d.google.com [2607:f8b0:400c:c02::22d]) by mx.google.com with ESMTPS id a9si9082274vcy.8.2013.05.24.03.39.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 May 2013 03:39:33 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22d is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22d; Received: by mail-vb0-f45.google.com with SMTP id 12so2948777vbf.18 for ; Fri, 24 May 2013 03:39:33 -0700 (PDT) X-Received: by 10.52.176.65 with SMTP id cg1mr6861884vdc.1.1369391973025; Fri, 24 May 2013 03:39:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp94527vcs; Fri, 24 May 2013 03:39:32 -0700 (PDT) X-Received: by 10.14.3.137 with SMTP id 9mr42446778eeh.0.1369391971814; Fri, 24 May 2013 03:39:31 -0700 (PDT) Received: from mail-ea0-x22c.google.com (mail-ea0-x22c.google.com [2a00:1450:4013:c01::22c]) by mx.google.com with ESMTPS id r44si21144428eep.103.2013.05.24.03.39.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 May 2013 03:39:31 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:4013:c01::22c is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=2a00:1450:4013:c01::22c; Received: by mail-ea0-f172.google.com with SMTP id d10so2571200eaj.31 for ; Fri, 24 May 2013 03:39:31 -0700 (PDT) X-Received: by 10.15.108.6 with SMTP id cc6mr41861236eeb.28.1369391971308; Fri, 24 May 2013 03:39:31 -0700 (PDT) Received: from localhost (2-224-81-44.ip169.fastwebnet.it. [2.224.81.44]) by mx.google.com with ESMTPSA id y2sm22719143eeu.2.2013.05.24.03.39.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 24 May 2013 03:39:30 -0700 (PDT) From: Fabio Baltieri To: Mark Brown Cc: Liam Girdwood , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij , Lee Jones , Ola Lilja , Fabio Baltieri Subject: [PATCH 2/6] ASoC: ab8500-codec: Move codec ops on a separate structure Date: Fri, 24 May 2013 12:39:16 +0200 Message-Id: <1369391960-27320-3-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1369391960-27320-1-git-send-email-fabio.baltieri@linaro.org> References: <1369391960-27320-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQlDrcWKPvxYR8FmSNxnBNWl7xLwbcMfaHRimHLwP19gwiXc2q5JcPZuRYUwHOSky6ZpGPGq X-Original-Sender: fabio.baltieri@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22d is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Define ab8500 codec operations structure on its own rather than inline with snd_soc_dai_drivers to clean up the code and make the style coherent with other codec drivers. Signed-off-by: Fabio Baltieri --- sound/soc/codecs/ab8500-codec.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 4ca45b9..b8ba0ad 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2380,6 +2380,11 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai, return 0; } +static const struct snd_soc_dai_ops ab8500_codec_ops = { + .set_fmt = ab8500_codec_set_dai_fmt, + .set_tdm_slot = ab8500_codec_set_dai_tdm_slot, +}; + static struct snd_soc_dai_driver ab8500_codec_dai[] = { { .name = "ab8500-codec-dai.0", @@ -2391,12 +2396,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = { .rates = AB8500_SUPPORTED_RATE, .formats = AB8500_SUPPORTED_FMT, }, - .ops = (struct snd_soc_dai_ops[]) { - { - .set_tdm_slot = ab8500_codec_set_dai_tdm_slot, - .set_fmt = ab8500_codec_set_dai_fmt, - } - }, + .ops = &ab8500_codec_ops, .symmetric_rates = 1 }, { @@ -2409,12 +2409,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = { .rates = AB8500_SUPPORTED_RATE, .formats = AB8500_SUPPORTED_FMT, }, - .ops = (struct snd_soc_dai_ops[]) { - { - .set_tdm_slot = ab8500_codec_set_dai_tdm_slot, - .set_fmt = ab8500_codec_set_dai_fmt, - } - }, + .ops = &ab8500_codec_ops, .symmetric_rates = 1 } };