From patchwork Wed Aug 16 17:15:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9904243 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8CA506038C for ; Wed, 16 Aug 2017 17:19:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72A2C285F2 for ; Wed, 16 Aug 2017 17:19:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6442628862; Wed, 16 Aug 2017 17:19:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D379E285F2 for ; Wed, 16 Aug 2017 17:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xiejPI4nC5qhPkWSbkSEKM7UVp61VaROL746ut4OdBY=; b=RRGFxuvE2tJYcSIOkDadGnQh26 LDF7Tv06hgW6jEdK9CW0qu0iS386/Q760UYgQV+nkJpsqwiofsEmHnmgf4Dav7rFezIC14lqvdj22 +dRffCp6oAJ3h/kzC9V27Pml2sqzb15HtGmjW+8oD3D1BWpIm25fipMF2PAiWkSfvnNuZzFEljgSP CgACP5Vi1e4mZDBW/efc/ikkOty9uAT3JQ88kaD4CPgG8uM2gMzEvF4mqMKxQXVy9zTOTHgygEK0B fX1w2fZ8cDYZFEsyEKxX61CHTjcf1HQQ3L7CdgVpOVwpYw+QEKhWLMgNSsVrMfstrgzy2RAnDPVXD iBn/zwew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1di1y5-0002E1-Lk; Wed, 16 Aug 2017 17:18:57 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1di1vI-0000tp-Hc for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2017 17:16:08 +0000 Received: by mail-pf0-x244.google.com with SMTP id t83so1856895pfj.3 for ; Wed, 16 Aug 2017 10:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wJp0TL8YbSidZ2Yp5QGKU34h6V4MBIWMkWb0PLslEJc=; b=GsrX0WsW5U6GkVmjlBtARCXdeC25qz5xx37Ikpd4RvhoL2b0lQCPESjhUC+ajN9Brs SAJSfGyJBNlRdx/bQF1XY4BxImRD/L6hq8d3foi+XsT4C0ILBaJYtD/6+KQjfh6alJg/ 5/M01E53aWTS//s+1mAkMb8MJhQt86GiKLlWkfuyJznT5fvMZ2H4Swo31eQud0ljfqte r3JcgH3nMTBRpTsgzsSK2mzb969hVQxTs4HVB34oVRKo2UJ0CP2NG0kLmxm2HnZGrz7A LQzSiWVtcTGdtgcvbQValxxeq86zgnRTItxoXW3jT5BBqh7gOBEQeiTj7jBwnP0Am/qf YZ8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wJp0TL8YbSidZ2Yp5QGKU34h6V4MBIWMkWb0PLslEJc=; b=Te8e8zB5/vvjSvkAqAkB3WnxVjixHz7IoJjEROw+LvkZN/I1l+8VQMhi1QJM8FG2Uv kDwDLNEkMTORBHr+rkfFSfHrP/JHCz5SQz0O03/NH0MKr9/TGEAwL1NtnBnLwhYKFH5Z 5fCcu7/0uIfPc9dt+FHl8tIjZ5/wtGOzsd0kqxrfmpWWKo4966DJPslapjRyiWn15E0U SLXzXR0mKYRsUc2tEu1EXnpAwEIu4MUFUB/7uw+AMYnuXvaFk7+aaIQJi4GwOsX9Zi3J TsgDdf4XVK2D8QHLGD5/YaHr9BfhnmEQgWQ2Q5hxRPo4ZMCGajKQrbs3+R0+0zoyrFhv FrrQ== X-Gm-Message-State: AHYfb5j2xKe2dMdiqwI+UXb2E1LuFK+PCV61CoNvOJhe9Rrt6J5CLmBj K5Co63THeHDNMw== X-Received: by 10.84.133.69 with SMTP id 63mr2705116plf.186.1502903743700; Wed, 16 Aug 2017 10:15:43 -0700 (PDT) Received: from gmail.com ([117.196.112.99]) by smtp.gmail.com with ESMTPSA id o73sm4261166pfj.1.2017.08.16.10.15.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Aug 2017 10:15:43 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Wed, 16 Aug 2017 22:45:35 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, rjui@broadcom.com, sbranden@broadcom.com, jonmason@broadcom.com, bcm-kernel-feedback-list@broadcom.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ASoC: codecs: make snd_soc_dai_driver and snd_soc_component_driver const Date: Wed, 16 Aug 2017 22:45:09 +0530 Message-Id: <1502903709-7411-3-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502903709-7411-1-git-send-email-bhumirks@gmail.com> References: <1502903709-7411-1-git-send-email-bhumirks@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170816_101604_891129_459157F1 X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bhumika Goyal MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Make these two structure variables const as they are either used in a copy operation or passed to devm_snd_soc_register_component having the corresponding argument as const. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- sound/soc/codecs/hdmi-codec.c | 2 +- sound/soc/codecs/lm4857.c | 2 +- sound/soc/codecs/max9768.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 7aba4f3..ce1be8b 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -692,7 +692,7 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd, return snd_ctl_add(rtd->card->snd_card, kctl); } -static struct snd_soc_dai_driver hdmi_i2s_dai = { +static const struct snd_soc_dai_driver hdmi_i2s_dai = { .name = "i2s-hifi", .id = DAI_ID_I2S, .playback = { diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c index 558de10..1e96407 100644 --- a/sound/soc/codecs/lm4857.c +++ b/sound/soc/codecs/lm4857.c @@ -100,7 +100,7 @@ static SOC_VALUE_ENUM_SINGLE_AUTODISABLE_DECL(lm4857_mode_enum, { "EP", "Earpiece", "Mode" }, }; -static struct snd_soc_component_driver lm4857_component_driver = { +static const struct snd_soc_component_driver lm4857_component_driver = { .controls = lm4857_controls, .num_controls = ARRAY_SIZE(lm4857_controls), .dapm_widgets = lm4857_dapm_widgets, diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c index 5b82e26..7017c03 100644 --- a/sound/soc/codecs/max9768.c +++ b/sound/soc/codecs/max9768.c @@ -151,7 +151,7 @@ static int max9768_probe(struct snd_soc_component *component) return 0; } -static struct snd_soc_component_driver max9768_component_driver = { +static const struct snd_soc_component_driver max9768_component_driver = { .probe = max9768_probe, .controls = max9768_volume, .num_controls = ARRAY_SIZE(max9768_volume),