From patchwork Thu Jul 25 10:31:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 815692 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 8B40CC3DA64 for ; Wed, 31 Jul 2024 08:46:39 +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 7F1D6210C; Wed, 31 Jul 2024 10:46:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7F1D6210C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722415592; 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=QDEV0a0rjE1ZTSWxOO89SR6+H3X2sdkGm6eksgxfVJZxGMwTWQoU7TuhEcxQ2QnXb AOtUVKeT1SocPSsi6qaagJp1u46p0TwVLTf/UGlMxfvzckv52kIMZZ1M4Fb7/5jiSa lowqfeMzJIGR+7FvIDNiHNGOPT+laZZJtYa7fkKw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7E3DF80589; Wed, 31 Jul 2024 10:45:24 +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 1641FF80602; Wed, 31 Jul 2024 10:45:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5E581F80482; Thu, 25 Jul 2024 12:31:53 +0200 (CEST) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 BEFFAF800AE for ; Thu, 25 Jul 2024 12:31:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BEFFAF800AE 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=TqpRbL+h Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a7b2dbd81e3so38755566b.1 for ; Thu, 25 Jul 2024 03:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721903506; x=1722508306; 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=TqpRbL+hqcMS6cKbWlWtrR0GnDcfgTFEl74OvSmF1ZvUdonqwu/ZVa88Qm4n9uzZNW fvcbUJhaB7HqeDnkMHw5dIIV5YWQafnjMpYSZACFeyGzbvS+RVWSQNQ3yvQ5QkG13BQm BPep0ekYseXSb0spMgBU5GIfWwHH42i2ezarhWVOFfStzxAvmgPjQqdMm2/Sw4Op2YPy q4iaXJnJDcydEE+h0ZR8NYzGF1t7T+cOb8gYYOHgkuXFjlpC8I4iiIM9S7bQoMAqeIkY ZUhlBzQFy3YLBOMOHQP9vRjfSbtBgU0bOiQaLYdEaV5QMB0lDN2ulPb7e/NfdGPz3NEg QpUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721903506; x=1722508306; 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=W1Teq0GIjFABzSyL2nQGfrRmdArkVBw5tFbF5FSMctHRamOKjFpNAUrzt0SPfpyY/U 0vByWFlr1MMYcALIz/KWgCNAsFOKXQfhqTVOtXjHkpBcRye2ZMMsb2qG7hj6Mf881Li1 TMmZFt5uxP51BvEymkpvkF/Ixja66wpQfAMNqy/tfaGT5mwA4Tq/VntOsbY84M0E9V3g fWYw5z4oZMl4sPjOkiVXxRa3wRr6pvQOJOxQ9oltOHVXWjBtzAoBls/CJmGBIYvk2nik zYK8Yl5g4TbnHBvbxR01ojrWlGxtfrCxWaDUPkLw3FVNIilqth6fDQC3tqPWyWvd43Aw koTg== X-Forwarded-Encrypted: i=1; AJvYcCV0eXUP5NjSfcsXAqe+5tXNaR1BaC6uWaJrLNDzlgQOQB4f7hQHYttew/DXDsCsGNH3k213ykCh5k3pQBV5WzSDlPCLCDcYx4TsQtA= X-Gm-Message-State: AOJu0YyyRO0/wlRPmfHoQ043sriTR0W1wnG5KySER1kCLKkZn/edzIGj 1fVOcSj6YWbJkJrFIw8ifucGSBFDsKdxVi6cvGeW244ii5ccZ6vGL1EbNTFm X-Google-Smtp-Source: AGHT+IE0/hpUdAcQx4dLRlMWzDI99oBJN7+P7fRlBEFw3PDOuVabqJfYozkGN3UY2efNKiho/QNr+Q== X-Received: by 2002:a17:907:2d0a:b0:a7a:a212:be48 with SMTP id a640c23a62f3a-a7ac5087e56mr177990766b.56.1721903503189; Thu, 25 Jul 2024 03:31:43 -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-a7acad903f1sm57280766b.152.2024.07.25.03.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 03:31:42 -0700 (PDT) From: Javier Carrasco Date: Thu, 25 Jul 2024 12:31:39 +0200 Subject: [PATCH 1/2] media: i2c: tda1997x: constify snd_soc_component_driver struct MIME-Version: 1.0 Message-Id: <20240725-const_snd_soc_component_driver-v1-1-3d7ee08e129b@gmail.com> References: <20240725-const_snd_soc_component_driver-v1-0-3d7ee08e129b@gmail.com> In-Reply-To: <20240725-const_snd_soc_component_driver-v1-0-3d7ee08e129b@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 , David Rhodes , Richard Fitzgerald , 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, patches@opensource.cirrus.com, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1721903500; l=964; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=wAda8xQPhY/5MLE9114YUL4s08mmQAnyb/WJmp3W3Q0=; b=g+GwinB2Om+/QI19eL/QDvSqsxnmXjF9gdTgw9VQo6YTUwrcAxKL/wFe4IHNNaaiUzHHdXQ29 T8cWG+KHnUBDrYJ+zT75Qz2Wr485h9ieY+INwWbKf+ktYVDL378CLex 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: UC2NPSK5HCCRJORQ5D4JO7KNHSXC3UC5 X-Message-ID-Hash: UC2NPSK5HCCRJORQ5D4JO7KNHSXC3UC5 X-Mailman-Approved-At: Wed, 31 Jul 2024 08:42:23 +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 Thu Jul 25 10:31:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 816345 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 69AA9C3DA64 for ; Wed, 31 Jul 2024 08:46:56 +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 465AC2232; Wed, 31 Jul 2024 10:46:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 465AC2232 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722415606; bh=ySj53zVL2RP4hd9XKHlE95BaO61mIJrRrZo6GMbFlg0=; 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=dAqiEsRRXpdVtqYog9/TCGNgR3Sa6cQhCwS7lpU2uXnk/KAaEGKNP4jhxH5og8vCg 48aif5WfIKZ9zGtCRKrU9Ps6ebl+YbaM0CeWbyUjMlE/v9wFM6Wsmq+myYlY6U/B+p Yoy7XbEmj3QQo7AKbAgul8w7QbkfaZOlLyUtZXiY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64DA1F80600; Wed, 31 Jul 2024 10:45:25 +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 8ABA3F80607; Wed, 31 Jul 2024 10:45:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 982F5F801F5; Thu, 25 Jul 2024 12:31:57 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 9AAD8F8026D for ; Thu, 25 Jul 2024 12:31:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9AAD8F8026D 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=BujtbJ2V Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a7b2dbd81e3so38760566b.1 for ; Thu, 25 Jul 2024 03:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721903508; x=1722508308; 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=YcFfHHMg/vpKPfjLUUikPwq0DiRK7mCRJuSC9q6OEfA=; b=BujtbJ2VvoBF2V42qhOBqCDDiswJ4V9Hr+5xAxGjKJKGMWOaqH3g0wxgW8lkNFQ27D eqaOTgfGISEm1/poo0XB1D2xuzoY0EeHuvBfWKBbFK99UGmatXfiF8Yq44JKQp67Wswa DeefiaJkTmpNfYXjmyodNm66VL1kIeiCsQ6XsWa83jrtTsl68mP5IaSfWHMTH2UT0aMP n7sgvQYuMF8Q4YDRmHnp1Oy5+4Z1yQxf5Orjka1PiD6DFvleQNNFS1934f1kP8916tcZ JyG/x16uL2U75diCDW82HaMHfz+DDrADLsqfAnEyU0XEndbVIp6qVs+9Dh0GPmn7T5aX aWCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721903508; x=1722508308; 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=YcFfHHMg/vpKPfjLUUikPwq0DiRK7mCRJuSC9q6OEfA=; b=LoHePBXczByLIsG17L2VhBXAsdnG/hJuNavuhAxkf99oTXZraW0ZYlb2dkgHbH7MsC X9x7rP2vw8wZkV9gd30ZJBkvv7GlsfGWPdmcFJqi9TlPFwkJDHPgIvAYcnJ/VQAtsuY+ 27msE06pS1SYhaPLfvaxdatpN4VbOlvuJuBvsMO4GrThi6/SrcY0aJRniUwXe/+EvHJJ rI7qqKBPFKKRSP1aB09q9LvvN2RURJexBeRihIU5wMLswDB/BH8il1ihAVL8ps/CKZMT wCsJ53l5Q3WYIy2nEzqUAJc8djICAu1k3nxghED29tCB/JE6poKuUvjnJmBy/ekjUEWN CzDw== X-Forwarded-Encrypted: i=1; AJvYcCWQzkevzOcSKvCa0QfhTuyT4hXONFMch6L9YkYKlc2MeK11LQOO5sbAshJDAKqAeYI74oPlnS5IzrE820V7Q6B3RzDzpKhofMzojdA= X-Gm-Message-State: AOJu0YwvW4fhZ9vf9MOff5OJ9DNsbTyobEkN5uiWNjGZDBaEC2hV8i9e vaq4FAaK404IQgYAvnEzjkUK4iCbF+Lyw4+WY8z0vl9J7/RiMmQfLuAhkyCr X-Google-Smtp-Source: AGHT+IEaqiztPzxb1PzAMKNaHMQ+BRHsmjzlCQLP8D7b3wmw6IZllEQCoc1gR9hApLg4z7JQqimmSA== X-Received: by 2002:a17:907:9694:b0:a6f:24fe:f2a7 with SMTP id a640c23a62f3a-a7ac4d9f4a7mr193283366b.10.1721903507280; Thu, 25 Jul 2024 03:31:47 -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-a7acad903f1sm57280766b.152.2024.07.25.03.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 03:31:46 -0700 (PDT) From: Javier Carrasco Date: Thu, 25 Jul 2024 12:31:40 +0200 Subject: [PATCH 2/2] ASoC: constify snd_soc_component_driver struct MIME-Version: 1.0 Message-Id: <20240725-const_snd_soc_component_driver-v1-2-3d7ee08e129b@gmail.com> References: <20240725-const_snd_soc_component_driver-v1-0-3d7ee08e129b@gmail.com> In-Reply-To: <20240725-const_snd_soc_component_driver-v1-0-3d7ee08e129b@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 , David Rhodes , Richard Fitzgerald , 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, patches@opensource.cirrus.com, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1721903500; l=8541; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=ySj53zVL2RP4hd9XKHlE95BaO61mIJrRrZo6GMbFlg0=; b=JwSs8y19BMfB32bcO/WktQ/BA0jtJssRSuec63vGXGLwGnYUnDXzVtb/uT5vwNXNLja0d9sLR U0l0peToTlsBXRy508x93yavE47eCyDYnrAcbXwqnslVzdw1nt3sTT9 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: 6FNGVI7LEMIX7IWRCUVGM6ADOPGCYSSR X-Message-ID-Hash: 6FNGVI7LEMIX7IWRCUVGM6ADOPGCYSSR X-Mailman-Approved-At: Wed, 31 Jul 2024 08:42:24 +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: The instances of the `snd_soc_component_driver` struct are not modified after their declaration, and they are only passed to `devm_snd_soc_register_component()`, which expects a constant `snd_soc_component_driver`. Move all instances of `snd_soc_component_driver` to read-only sections by declaring them const. 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/cs43130.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/sti-sas.c | 2 +- sound/soc/codecs/tas6424.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 2 +- sound/soc/uniphier/evea.c | 2 +- 13 files changed, 14 insertions(+), 14 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/cs43130.c b/sound/soc/codecs/cs43130.c index be4037890fdb..90909f452ba5 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c @@ -2398,7 +2398,7 @@ static int cs43130_probe(struct snd_soc_component *component) return 0; } -static struct snd_soc_component_driver soc_component_dev_cs43130 = { +static const struct snd_soc_component_driver soc_component_dev_cs43130 = { .probe = cs43130_probe, .controls = cs43130_snd_controls, .num_controls = ARRAY_SIZE(cs43130_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/sti-sas.c b/sound/soc/codecs/sti-sas.c index c421906a0694..3a1cdb329f31 100644 --- a/sound/soc/codecs/sti-sas.c +++ b/sound/soc/codecs/sti-sas.c @@ -386,7 +386,7 @@ static int sti_sas_component_probe(struct snd_soc_component *component) return sti_sas_init_sas_registers(component, drvdata); } -static struct snd_soc_component_driver sti_sas_driver = { +static const struct snd_soc_component_driver sti_sas_driver = { .probe = sti_sas_component_probe, .resume = sti_sas_resume, .idle_bias_on = 1, 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,