Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1340928imd; Sat, 27 Oct 2018 07:11:12 -0700 (PDT) X-Google-Smtp-Source: AJdET5eYBYX6DlhCKYXQZOM2vJsc9dpKc+N1N/IWh51/6IAVK6FLYIGx0WIHxJGa89vOp6/y1qk9 X-Received: by 2002:a62:221c:: with SMTP id i28-v6mr7944682pfi.196.1540649472543; Sat, 27 Oct 2018 07:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540649472; cv=none; d=google.com; s=arc-20160816; b=FdY23kesb2rc7pQv2r+NhSxsMqywKNpwA6Pf46rfcWbZt+uIcgJ3mYGemlPgFhiS3U ERzSx2Gma3cjvmtqQos+CcbcYiLrz9RksdzwMZgaEE8UMO52AhBaa+TUaQZwKu4viLky mqld54TiYugXVxkluusBfAnTw/Lo6v/S4c1rd7yHesMLLSRE6MmKOwzsVJ/eMt4UbbGr R6oM+taPiuqc8gGEUSxpfepqhdxd2XzhIvr/oX6zHexJs9M3F8dxMAfV2lWl/yxTW8f+ LQXMwBm3QJRQ5WBkI1LZfWHk8FZw6x+YwYjjNP/cvTHUlQKzMQlojchuIunSOGkh7id6 iQsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=4V8vnA5s1Sm/by3C2hK3Dxt6uJOm+RUkhhvqrKq9tF8=; b=w0NnKGwGgVi6SQWiFrKZHACqEd/RU9ytexxUaMQi/OWkpZRk8H9SXd9+G1ZNRM2Jq9 GDNZMwQtpBqw8qPweqm3pzVrm6HklCY0TfQFmpSzfHj5Q2dmrCP8om2jblJgaSz5pqWu OQrS4lgdZMAYf3RreV1Kd0B6m1aen8WBllNClgs+G7WyANI9xKglBKoB/C9GdXCu+r+o b4BNXN8536zvvTkZMWG9ZpyaHcTqCLHgu9RcAnj2ATmcEOHAwfeI9LQAe0Al4umCbD/d bp3YYqGLK+TPv2ZjJvTWvGr+mdJ0GY9G7HveHEowfqAOy9d+mhUALf383co7IvkLfIWN hx8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 142-v6si15140103pga.540.2018.10.27.07.10.41; Sat, 27 Oct 2018 07:11:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728765AbeJ0WvN (ORCPT + 99 others); Sat, 27 Oct 2018 18:51:13 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:29007 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728727AbeJ0WvN (ORCPT ); Sat, 27 Oct 2018 18:51:13 -0400 X-IronPort-AV: E=Sophos;i="5.54,432,1534802400"; d="scan'208";a="283512250" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 27 Oct 2018 16:10:03 +0200 From: Julia Lawall To: Liam Girdwood Cc: kernel-janitors@vger.kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ASoC: codecs: constify snd_soc_dai_ops structures Date: Sat, 27 Oct 2018 15:34:44 +0200 Message-Id: <1540647284-26728-4-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1540647284-26728-1-git-send-email-Julia.Lawall@lip6.fr> References: <1540647284-26728-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- sound/soc/codecs/ak4458.c | 2 +- sound/soc/codecs/ak5558.c | 2 +- sound/soc/codecs/hdac_hda.c | 2 +- sound/soc/codecs/tas6424.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index 299ada4dfaa0..70d4c89bd6fc 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -456,7 +456,7 @@ static int ak4458_startup(struct snd_pcm_substream *substream, return ret; } -static struct snd_soc_dai_ops ak4458_dai_ops = { +static const struct snd_soc_dai_ops ak4458_dai_ops = { .startup = ak4458_startup, .hw_params = ak4458_hw_params, .set_fmt = ak4458_set_dai_fmt, diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c index 448bb90c9c8e..60f1f12c81ea 100644 --- a/sound/soc/codecs/ak5558.c +++ b/sound/soc/codecs/ak5558.c @@ -246,7 +246,7 @@ static int ak5558_startup(struct snd_pcm_substream *substream, &ak5558_rate_constraints); } -static struct snd_soc_dai_ops ak5558_dai_ops = { +static const struct snd_soc_dai_ops ak5558_dai_ops = { .startup = ak5558_startup, .hw_params = ak5558_hw_params, diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c index 2aaa83028e55..ffecdaaa8cf2 100644 --- a/sound/soc/codecs/hdac_hda.c +++ b/sound/soc/codecs/hdac_hda.c @@ -46,7 +46,7 @@ static int hdac_hda_dai_set_tdm_slot(struct snd_soc_dai *dai, static struct hda_pcm *snd_soc_find_pcm_from_dai(struct hdac_hda_priv *hda_pvt, struct snd_soc_dai *dai); -static struct snd_soc_dai_ops hdac_hda_dai_ops = { +static const struct snd_soc_dai_ops hdac_hda_dai_ops = { .startup = hdac_hda_dai_open, .shutdown = hdac_hda_dai_close, .prepare = hdac_hda_dai_prepare, diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c index 36aebdb8f55c..aaba39295079 100644 --- a/sound/soc/codecs/tas6424.c +++ b/sound/soc/codecs/tas6424.c @@ -378,7 +378,7 @@ static struct snd_soc_component_driver soc_codec_dev_tas6424 = { .non_legacy_dai_naming = 1, }; -static struct snd_soc_dai_ops tas6424_speaker_dai_ops = { +static const struct snd_soc_dai_ops tas6424_speaker_dai_ops = { .hw_params = tas6424_hw_params, .set_fmt = tas6424_set_dai_fmt, .set_tdm_slot = tas6424_set_dai_tdm_slot,