From patchwork Wed Sep 29 09:31:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12525055 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78E6EC433F5 for ; Wed, 29 Sep 2021 09:32:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBB34613D0 for ; Wed, 29 Sep 2021 09:32:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EBB34613D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B7D441689; Wed, 29 Sep 2021 11:31:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B7D441689 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1632907960; bh=MwOAfykhP5zgTLQ4vSXRzdd3GZS2toXMaqtYclRZEY8=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=CUxvF/84nm6MqlSephnIhDbpql+m4IrtUEoNAtE+a22MStXryRgYV9MgUY1BBAE8w Qir6xwiqBdViQXul899WFY6TUnRAEulUbhqNtUR13qAppgbzG1BpG1DfUdlXERg0d9 zWIBylfXRWv9vvFHxzf6YyZE4mhoISRN6qVUsQIU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4EF0FF80105; Wed, 29 Sep 2021 11:31:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C2227F80227; Wed, 29 Sep 2021 11:31:48 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D9DD2F80105 for ; Wed, 29 Sep 2021 11:31:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D9DD2F80105 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ThxTKH8U" Received: by mail-lf1-x133.google.com with SMTP id m3so8124902lfu.2 for ; Wed, 29 Sep 2021 02:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v/UGSy92lBMO//Gz9RL9r0Z90ZEqI/HZ9DcXU2pm2WA=; b=ThxTKH8UE/PEbqm5nMiArOtjD3zpEzB8+HfD6CI7jeQJqe8q7HIYMBrhSgU+LaAuto smh8NC4aah7HbtZXgq3EkQ4pPfBs3gEt23lg7NITWTJmxZOAW/hW6BQx4cU6nyBxTHdS 4NJI0alZIqHjaPLhvaPbaqHdYt5dHTieCfMKI0iORFIVElhidD/TaMWptD3B30HuAwaf xztX5EQ8GbEISHs27HfqDhHBi4u82UUJfWHELvgDD3Op5QokttLtCpAnbo9TmYn64Uwv OR5aG4bPFDGuwGAhT8zdiVwcqrWgitZF+6luHiIytjfjqLtUhmxNVOQRki/vScQZGwsj IdNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v/UGSy92lBMO//Gz9RL9r0Z90ZEqI/HZ9DcXU2pm2WA=; b=rX81bAH+cf8+KXRGrDbQsONrEyLyrxs5TuqGlF/4gWjBEdyNiZNmni8Y6YiuvY9d1e W8bNF5LvbjKNUV2cWZCCoPPKNfvh2uJOxr24ft6dygW4teIvvYzP4ZYSKEQ68V+3fZOP l465siaGbE6Yfd+3mMTy5O6HPfd04tz/hIM24PIpvJ6iCL+Beu8wTDD+0vOoI75AFKE0 slhNEglYf7NYpbf7oF56VtIKevX0YW4/JDHZt77O3UNGlU/jg2S1Sitx2FQMOIEMLCWf t6uNuwU6yZ/62RyqZmsbxutbfS7D2o+AazUi3OtySHAO7pLcVAFadY8jkowP6yc0m7Y3 sP7g== X-Gm-Message-State: AOAM532PzUC5OOmBWsbeiIm3EujurOdAGZj4i66x6gelcAuLpvC9woGk KjIWLnq3kreTjho83aunwpk= X-Google-Smtp-Source: ABdhPJwW4/4zsW63VKddIGXUEAZY6myLvIRsXoZS6oK5Kniynr0ocbgfm+QATYDGdfGFM9XeHDO40Q== X-Received: by 2002:a2e:a22a:: with SMTP id i10mr4879367ljm.464.1632907902914; Wed, 29 Sep 2021 02:31:42 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id a25sm181519lfk.63.2021.09.29.02.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 02:31:42 -0700 (PDT) From: Rikard Falkeborn To: Peter Ujfalusi , Liam Girdwood , Mark Brown , Jarkko Nikula Subject: [PATCH] ASoC: ti: Constify static snd_soc_ops Date: Wed, 29 Sep 2021 11:31:21 +0200 Message-Id: <20210929093121.21253-1-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rikard Falkeborn , Takashi Iwai , linux-omap@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" These are only assigned to the ops field in the snd_soc_dai_link struct which is a pointer to const struct snd_soc_ops. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/ti/davinci-evm.c | 2 +- sound/soc/ti/omap-abe-twl6040.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c index b043a0070d20..68d69e32681a 100644 --- a/sound/soc/ti/davinci-evm.c +++ b/sound/soc/ti/davinci-evm.c @@ -73,7 +73,7 @@ static int evm_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_ops evm_ops = { +static const struct snd_soc_ops evm_ops = { .startup = evm_startup, .shutdown = evm_shutdown, .hw_params = evm_hw_params, diff --git a/sound/soc/ti/omap-abe-twl6040.c b/sound/soc/ti/omap-abe-twl6040.c index 2e3d1eea77c1..da809c7f25a4 100644 --- a/sound/soc/ti/omap-abe-twl6040.c +++ b/sound/soc/ti/omap-abe-twl6040.c @@ -96,7 +96,7 @@ static int omap_abe_dmic_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_ops omap_abe_dmic_ops = { +static const struct snd_soc_ops omap_abe_dmic_ops = { .hw_params = omap_abe_dmic_hw_params, };