From patchwork Mon Jul 29 09:37:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 816337 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 alsa0.perex.cz (unknown [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 049BCC3DA64 for ; Wed, 31 Jul 2024 08:53:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DAFF22CBF; Wed, 31 Jul 2024 10:53:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DAFF22CBF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722416004; bh=wAda8xQPhY/5MLE9114YUL4s08mmQAnyb/WJmp3W3Q0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=e0OIxa2ohd0bGGxXBIiT+3XpdjZddCa2WqecFJcAar26D2JDeVFHNG8jWkN1ChnEl 8UaFyZT92JjflWJsTcsiVUQWiWUErJ7jHqErx1WxUoaVdcfQs/sUheesqj4dMbpcIa rCcmuiF39SVJiDSxYMZCA16gudQt7Jr9OtxduORA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C8516F807A2; Wed, 31 Jul 2024 10:50:05 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2F230F80857; Wed, 31 Jul 2024 10:50:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9B04F80269; Mon, 29 Jul 2024 11:40:33 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 86FEBF80269 for ; Mon, 29 Jul 2024 11:37:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 86FEBF80269 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lbPyXhg5 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52efd08e6d9so4937111e87.1 for ; Mon, 29 Jul 2024 02:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722245870; x=1722850670; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=yOeiGXeuTWh9ihbymAzgAMoDAdspVLgp4kSjE/YSgxc=; b=lbPyXhg5uh7gEloQ4SLJ76gKEVUiTK/H9wNwZgQz/XLDHZBS+1CfwpVfWaHHvy/EXZ TlBCH96Z5d1R++qufqOLEO2fiao+CRikXxL8S57b0riEYuqxHn2/XtNE9Rq3l/P7cEst RVHPxbGQ85+jvpbR//FwCYQ6Ikb8W18DUSR0mNmh8u7QtV19TohNmmzVR/hTXqwnym5l CdW7egX2ZgY6pvhwZcj5/pfLtvKTkjcxDMx9TGuFbIl92JL14kvDMUq0tfo0962bGiCS leN1p+jWYzpetchu4J2mv1EvOSA/qRyubQPvNxOYfPiSIH6VmpYrbzjuJ1b3TW5EE2a3 Q2hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722245870; x=1722850670; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yOeiGXeuTWh9ihbymAzgAMoDAdspVLgp4kSjE/YSgxc=; b=BygNewkoG02H6b1DbitR4QJJOYoiscWB/1KK7+/URVEZOnDL0xFSAOnQkM5yZw5lHl RvQdJ/MkhUxaZTJ7/IIavDr2ygGqdPkDcDEuqsTp2RIwLYOSPuprLOPFWMPOD5boR9PX vUdwYcj6QIyS6bdYb9enuxqWMXTtoLsMjyKKzd/UZcF1Fkre5NIrX1amQIdWGG64NQD6 T9RaiR71FleDHE7hZ8Q3Pi3OCP5Uba1JbMEd1ONsUzth/c7yef8ju40lplRUyYmsHl8s RfaZkF1sG9JXCQezwMSu/wGeaO6B7hSXh1FtTX2+7QsKgBCw0qb3ju76IHonKi4qZGAM WU9A== X-Forwarded-Encrypted: i=1; AJvYcCV0cprUcQ8nwjeCyE+dAd+d1gcBHBNa2ugZdeCEKQk7cNaqNoewTpphUq3HqpPh6V24rijxy6L8TgQis6JkZntozukv9ZBeGarl3Ao= X-Gm-Message-State: AOJu0YwFh28xxeExjo8ETjBus/eAAeZwkDYnTe3X+AgcVlW3cPnTtHsI lkg6f3P4Y5x/o3ddTWxfaFdFRfMlROvIM4Ckan60BVppfivdamde X-Google-Smtp-Source: AGHT+IGp8Xl1NyteK2cTJheiqkYuxoPksdVWbAT4rxFLqcdzbR1MWL/U0yFGfpkoM2CelSanXwxOeQ== X-Received: by 2002:ac2:4bd2:0:b0:52e:9be7:91aa with SMTP id 2adb3069b0e04-5309b259b5dmr6037212e87.10.1722245869608; Mon, 29 Jul 2024 02:37:49 -0700 (PDT) Received: from [127.0.1.1] (91-118-163-37.static.upcbusiness.at. [91.118.163.37]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41b24sm481617966b.116.2024.07.29.02.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 02:37:49 -0700 (PDT) From: Javier Carrasco Date: Mon, 29 Jul 2024 11:37:37 +0200 Subject: [PATCH v2 1/2] media: i2c: tda1997x: constify snd_soc_component_driver struct MIME-Version: 1.0 Message-Id: <20240729-const_snd_soc_component_driver-v2-1-1994f44f1ec2@gmail.com> References: <20240729-const_snd_soc_component_driver-v2-0-1994f44f1ec2@gmail.com> In-Reply-To: <20240729-const_snd_soc_component_driver-v2-0-1994f44f1ec2@gmail.com> To: Tim Harvey , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Ray Jui , Scott Branden , Broadcom internal kernel review list , Shenghao Ding , Kevin Lu , Baojun Xu , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue , Kunihiko Hayashi , Masami Hiramatsu Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1722245866; l=964; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=wAda8xQPhY/5MLE9114YUL4s08mmQAnyb/WJmp3W3Q0=; b=VMyTy/QXOHFk3SHVvDT19NltCELdp9XjDYOsQIhbx4wsTvUrAlC+4pd5dk7/VTqxZG3pTVCol Ay5w0EMq1AkB3kS+nWJsctwKtLCO2KA8PB5McC/Lm/vGTVmaaQFcDeo X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-MailFrom: javier.carrasco.cruz@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 3F74WKPBJISNPZJGBFUZPI4PHL3XLDVN X-Message-ID-Hash: 3F74WKPBJISNPZJGBFUZPI4PHL3XLDVN X-Mailman-Approved-At: Wed, 31 Jul 2024 08:49:35 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: `tda1997x_codec_driver` is not modified after its declaration, and it is only passed to `devm_snd_soc_register_component()`, which expects a constant `snd_soc_component_driver`. Move `tda1997x_codec_driver` to a read-only section by declaring it const. Signed-off-by: Javier Carrasco --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 58ce8fec3041..3b7e5ff5b010 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2514,7 +2514,7 @@ static void tda1997x_codec_remove(struct snd_soc_component *component) { } -static struct snd_soc_component_driver tda1997x_codec_driver = { +static const struct snd_soc_component_driver tda1997x_codec_driver = { .probe = tda1997x_codec_probe, .remove = tda1997x_codec_remove, .idle_bias_on = 1, From patchwork Mon Jul 29 09:37:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 816336 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 alsa0.perex.cz (unknown [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37CE6C3DA64 for ; Wed, 31 Jul 2024 08:54:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6DBE32CE8; Wed, 31 Jul 2024 10:53:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DBE32CE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722416033; bh=zZ1diTwdBFLWVY+JZ+0pKMWYvvFbvI82HD0Up/hucrg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JFGW5XRujRnGt4tJVg9i95AjcySAICzIfu0Yse8GjvfPvW7hsgBex9MMSqzpYF9Qc gQLSpHX9iL+x1WoMsr1H0cTM118wzM5mne29O0P9t/GpWyf0XGE2fICkPF5fks84W1 sqHIoxXPUSEhOE6NHcfdnJAB2cy//tSxgAjkBjUQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C2C53F808C5; Wed, 31 Jul 2024 10:50:10 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0D4CEF80BF3; Wed, 31 Jul 2024 10:50:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4B2E4F80448; Mon, 29 Jul 2024 11:40:57 +0200 (CEST) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6F116F8026A for ; Mon, 29 Jul 2024 11:37:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6F116F8026A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=LOGYEvGa Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a77ec5d3b0dso394734866b.0 for ; Mon, 29 Jul 2024 02:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722245871; x=1722850671; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3eJDPYXgy8QQkiw/Zb7wYEQMVUFtjlM4KzTipc5erj0=; b=LOGYEvGakfqIhaIRMePWBUjXNg75QrRrqVhjCTNYqZG4h+ckhjIhBIBKag22PRK6zx b9jLIoRl4QtKeOMTcSisjZkBsZlgvInjvymCYtdbpzlgNM/A6hXAl6Fo706Yd3gcy7Fz BF2pupXEyWXmB1uMfRhjncJmcxSryc6TkZPjXGeV7WquVpEFdBLs6/K+FZ0rbc3r+brk 4ItMdDH78eXPXgi6y7+xZHK5atCjxc4m6RH3HQk4F/Z7KwEHwXyXD4HrORt1Qf6f1aqP C+glUHkhoeajKJtHuS/ZzBiNtezpd5Yu9/aC0wN1X2de0hhEUIZdTloL4fYgAYmHJvv2 xKDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722245871; x=1722850671; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3eJDPYXgy8QQkiw/Zb7wYEQMVUFtjlM4KzTipc5erj0=; b=ZRkbjw3OpFERiKfDy4gI562sJMXaF9Sp0J1h/BfX9mfQ8gOneJ/xSrJg8rb9TIqCR7 7vsmw+utP32sXAXckWmXHQplINCTQ5dyPInhKDnG1j2YZXVaHQcDHlwpCvnDEdUbTRWf L4Yt+2aFjqbVow9gj8NcbcFj/lOj35LOOgWKWOXUr93rY/5siB/CqH9DxncplKj7euJf BhtCrD/033TFEtdZ15t38sI22NG6C2ojjGkN0lYycI7v69fAW+oDG0v4viJwy6gNsff2 ZQrqQQvHRfwQwEAZXjOqCvbr6wre9GOflQ6THEb2tbufqOAjF4Z1zEKVXIW0dpj1P4RT E7+w== X-Forwarded-Encrypted: i=1; AJvYcCURoRzFJirNdJbqK/gIqs+SE9vz53hWhcjLDAz0e0nSV3CIyavc4tZDj1K7TdLtkVJsqAVC8J+6/gL/Sn6K2SmlM12CQ3CQOSWjeHU= X-Gm-Message-State: AOJu0YzRH4OwOZM1+9M7PvtJdbrDF853kY5xD54wyW1PJwVwehaKCcW7 ckkfcaK7YqlZL32mEOuzlSFK0IamErSLUjEvB3mZ5tCaQ0RrIw2s X-Google-Smtp-Source: AGHT+IEBHnn7keFlJ0y5guCeEd5XYooTXx71rjnTo2kZAITFA6R1xQQb3gBfc6pw8Nx1ROztsH5/xw== X-Received: by 2002:a17:906:d54a:b0:a7a:a763:8428 with SMTP id a640c23a62f3a-a7d3ffef7e0mr398513466b.25.1722245871127; Mon, 29 Jul 2024 02:37:51 -0700 (PDT) Received: from [127.0.1.1] (91-118-163-37.static.upcbusiness.at. [91.118.163.37]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41b24sm481617966b.116.2024.07.29.02.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 02:37:50 -0700 (PDT) From: Javier Carrasco Date: Mon, 29 Jul 2024 11:37:38 +0200 Subject: [PATCH v2 2/2] ASoC: constify snd_soc_component_driver struct MIME-Version: 1.0 Message-Id: <20240729-const_snd_soc_component_driver-v2-2-1994f44f1ec2@gmail.com> References: <20240729-const_snd_soc_component_driver-v2-0-1994f44f1ec2@gmail.com> In-Reply-To: <20240729-const_snd_soc_component_driver-v2-0-1994f44f1ec2@gmail.com> To: Tim Harvey , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Ray Jui , Scott Branden , Broadcom internal kernel review list , Shenghao Ding , Kevin Lu , Baojun Xu , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue , Kunihiko Hayashi , Masami Hiramatsu Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1722245866; l=7340; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=zZ1diTwdBFLWVY+JZ+0pKMWYvvFbvI82HD0Up/hucrg=; b=cRSDxdHyOHXmzLyYvLiNlix02j3ou428swU4/3/NqFC3bMG3c7oecUnUl5+vKxiblOPgDxGaB ny4oe+aTVW0Dn0OxNtzjiG8MAMO6P3tIKEmPT2ClAJheGb4Y3GQmsgL X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-MailFrom: javier.carrasco.cruz@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: BTXERUWRMXDPUVK2JJZPOKVZ55ZBAMUS X-Message-ID-Hash: BTXERUWRMXDPUVK2JJZPOKVZ55ZBAMUS X-Mailman-Approved-At: Wed, 31 Jul 2024 08:49:36 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Declare `snd_soc_component_driver` as const to move it to a read-only section for the drivers that do not modify the struct after its declaration. The affected drivers only pass this struct to `devm_snd_soc_register_component()`, whose argument is const and therefore does not modify the content of the struct. Signed-off-by: Javier Carrasco --- sound/soc/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- sound/soc/bcm/cygnus-pcm.c | 2 +- sound/soc/codecs/cpcap.c | 2 +- sound/soc/codecs/pcm186x.c | 4 ++-- sound/soc/codecs/pcm5102a.c | 2 +- sound/soc/codecs/spdif_receiver.c | 2 +- sound/soc/codecs/spdif_transmitter.c | 2 +- sound/soc/codecs/tas6424.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 2 +- sound/soc/uniphier/evea.c | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index ea01d6490cec..3392693faeb9 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -311,7 +311,7 @@ static int au1xpsc_pcm_new(struct snd_soc_component *component, } /* au1xpsc audio platform */ -static struct snd_soc_component_driver au1xpsc_soc_component = { +static const struct snd_soc_component_driver au1xpsc_soc_component = { .name = DRV_NAME, .open = au1xpsc_pcm_open, .close = au1xpsc_pcm_close, diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index d2fdebd8881b..c9c2b1e71d55 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c @@ -289,7 +289,7 @@ static int alchemy_pcm_new(struct snd_soc_component *component, return 0; } -static struct snd_soc_component_driver alchemy_pcm_soc_component = { +static const struct snd_soc_component_driver alchemy_pcm_soc_component = { .name = DRV_NAME, .open = alchemy_pcm_open, .close = alchemy_pcm_close, diff --git a/sound/soc/bcm/cygnus-pcm.c b/sound/soc/bcm/cygnus-pcm.c index 2d1e241d8367..4cb2fe10bcdc 100644 --- a/sound/soc/bcm/cygnus-pcm.c +++ b/sound/soc/bcm/cygnus-pcm.c @@ -707,7 +707,7 @@ static int cygnus_dma_new(struct snd_soc_component *component, return 0; } -static struct snd_soc_component_driver cygnus_soc_platform = { +static const struct snd_soc_component_driver cygnus_soc_platform = { .open = cygnus_pcm_open, .close = cygnus_pcm_close, .prepare = cygnus_pcm_prepare, diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c index 4f9dabd9d78a..04304a7ad915 100644 --- a/sound/soc/codecs/cpcap.c +++ b/sound/soc/codecs/cpcap.c @@ -1649,7 +1649,7 @@ static int cpcap_soc_probe(struct snd_soc_component *component) return cpcap_audio_reset(component, false); } -static struct snd_soc_component_driver soc_codec_dev_cpcap = { +static const struct snd_soc_component_driver soc_codec_dev_cpcap = { .probe = cpcap_soc_probe, .controls = cpcap_snd_controls, .num_controls = ARRAY_SIZE(cpcap_snd_controls), diff --git a/sound/soc/codecs/pcm186x.c b/sound/soc/codecs/pcm186x.c index 451a8fd8fac5..13443f569ddb 100644 --- a/sound/soc/codecs/pcm186x.c +++ b/sound/soc/codecs/pcm186x.c @@ -566,7 +566,7 @@ static int pcm186x_set_bias_level(struct snd_soc_component *component, return 0; } -static struct snd_soc_component_driver soc_codec_dev_pcm1863 = { +static const struct snd_soc_component_driver soc_codec_dev_pcm1863 = { .set_bias_level = pcm186x_set_bias_level, .controls = pcm1863_snd_controls, .num_controls = ARRAY_SIZE(pcm1863_snd_controls), @@ -579,7 +579,7 @@ static struct snd_soc_component_driver soc_codec_dev_pcm1863 = { .endianness = 1, }; -static struct snd_soc_component_driver soc_codec_dev_pcm1865 = { +static const struct snd_soc_component_driver soc_codec_dev_pcm1865 = { .set_bias_level = pcm186x_set_bias_level, .controls = pcm1865_snd_controls, .num_controls = ARRAY_SIZE(pcm1865_snd_controls), diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c index 3401a25341e6..9bca53de2475 100644 --- a/sound/soc/codecs/pcm5102a.c +++ b/sound/soc/codecs/pcm5102a.c @@ -24,7 +24,7 @@ static struct snd_soc_dai_driver pcm5102a_dai = { }, }; -static struct snd_soc_component_driver soc_component_dev_pcm5102a = { +static const struct snd_soc_component_driver soc_component_dev_pcm5102a = { .idle_bias_on = 1, .use_pmdown_time = 1, .endianness = 1, diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c index 862e0b654a1c..7043aa9a206e 100644 --- a/sound/soc/codecs/spdif_receiver.c +++ b/sound/soc/codecs/spdif_receiver.c @@ -35,7 +35,7 @@ static const struct snd_soc_dapm_route dir_routes[] = { SNDRV_PCM_FMTBIT_S32_LE | \ SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) -static struct snd_soc_component_driver soc_codec_spdif_dir = { +static const struct snd_soc_component_driver soc_codec_spdif_dir = { .dapm_widgets = dir_widgets, .num_dapm_widgets = ARRAY_SIZE(dir_widgets), .dapm_routes = dir_routes, diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c index 736518921555..d997862767ec 100644 --- a/sound/soc/codecs/spdif_transmitter.c +++ b/sound/soc/codecs/spdif_transmitter.c @@ -35,7 +35,7 @@ static const struct snd_soc_dapm_route dit_routes[] = { { "spdif-out", NULL, "Playback" }, }; -static struct snd_soc_component_driver soc_codec_spdif_dit = { +static const struct snd_soc_component_driver soc_codec_spdif_dit = { .dapm_widgets = dit_widgets, .num_dapm_widgets = ARRAY_SIZE(dit_widgets), .dapm_routes = dit_routes, diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c index bb0500e9d3ea..9be054837f68 100644 --- a/sound/soc/codecs/tas6424.c +++ b/sound/soc/codecs/tas6424.c @@ -364,7 +364,7 @@ static int tas6424_set_bias_level(struct snd_soc_component *component, return 0; } -static struct snd_soc_component_driver soc_codec_dev_tas6424 = { +static const struct snd_soc_component_driver soc_codec_dev_tas6424 = { .set_bias_level = tas6424_set_bias_level, .controls = tas6424_snd_controls, .num_controls = ARRAY_SIZE(tas6424_snd_controls), diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c index fb5dd9a68bea..b35c28b70265 100644 --- a/sound/soc/stm/stm32_adfsdm.c +++ b/sound/soc/stm/stm32_adfsdm.c @@ -309,7 +309,7 @@ static void stm32_adfsdm_cleanup(void *data) iio_channel_release_all_cb(data); } -static struct snd_soc_component_driver stm32_adfsdm_soc_platform = { +static const struct snd_soc_component_driver stm32_adfsdm_soc_platform = { .open = stm32_adfsdm_pcm_open, .close = stm32_adfsdm_pcm_close, .hw_params = stm32_adfsdm_pcm_hw_params, diff --git a/sound/soc/uniphier/evea.c b/sound/soc/uniphier/evea.c index d90b3e4b0104..a4cf14462374 100644 --- a/sound/soc/uniphier/evea.c +++ b/sound/soc/uniphier/evea.c @@ -384,7 +384,7 @@ static int evea_codec_resume(struct snd_soc_component *component) return ret; } -static struct snd_soc_component_driver soc_codec_evea = { +static const struct snd_soc_component_driver soc_codec_evea = { .probe = evea_codec_probe, .suspend = evea_codec_suspend, .resume = evea_codec_resume,