Message ID | 20240729-const_snd_soc_component_driver-v2-1-1994f44f1ec2@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 07159C3DA4A for <linux-arm-kernel@archiver.kernel.org>; Mon, 29 Jul 2024 09:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yOeiGXeuTWh9ihbymAzgAMoDAdspVLgp4kSjE/YSgxc=; b=RU05YwZm6GVX8xbdDNLVsTUHjy 4XyDjXlVYvEYZPlZEH3/MlLCE/DKGuAqtwI5uJvSkd5n3KWOmU00PBxfQDie5MOFwUbZMLK3LQxzJ Mo9ID327N/IXHKkROucA01G0zcCywzE+VX81HcYhrNhH5A9U6PdNic3aeB+6lezmWjXKDtw9JoI0/ 03ag/wNaiFeXk1P4Suu7feuQs7OxTPE2aNkQDSRlKwO/rou9JcAZ6kG2q0KTUU5f6N6QdcFhj9e5r WJUS06tjA3JSpsay6u04Eo6KLXP+dkF3mZqdgO6o4Jb/TY8VsEHaeBvi45w72PpTZCRB2imUNbe6F WCJCMlpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYMq2-0000000AjZG-1isv; Mon, 29 Jul 2024 09:38:42 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYMpD-0000000AjHL-3CmQ for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 09:37:53 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2f035ae0fd1so39185631fa.2 for <linux-arm-kernel@lists.infradead.org>; 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=lists.infradead.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=BnC3HeyoWKLmlnQ+UkL7O510uB719/aK00w4HiugZ6Dl4UMxZjU1ZABI/4fHqhBRMR 1fnwplqn0U0gvMs6awayOGrKyEOIZ2kQAbw9it0QJxy8k1asij4/2sVLdjwIqQLqtF/V vuUKgzu/ohQGEENrn1NkvaDzrGpnloTJy+D0jlnJ1c8hVoLHLiT7MUil6o5kqUhel7Wt vin7iANdrKJdDSGYTsAzcnEbZE6Brf8BsfBURsSNz0A+SFTDOSlwXw2nSVcbXZUUMOGc 4l/hBwPxS0Cz74gBDlnDCjJ555xVPrPYQrN4tAEUwvDHteCsjXbO4ldESe2rMQaFgxxD zRTg== 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=U+vmbolnxLLTmQ+urllT793lcp1hri4Y+9H/u71hle7nYg7yL+3BV4dQmLPj8c758M 25TUCwS3hlzbkHPQggYk3xKrKDtzlz1P9pho4jyz7tQGk1642J55yuK4TFNjGl4esXDd 9ixfwhEpcsSbmMlO+x9kVD0j5tqC0SShSvZsCv8wuryFK5VkZqODr07kYdOZzA0gDt0n HBBk4usGMvwaHYkHIH9mpj++WD5K08NI8CDKX7QnfaaVssOo+8rSday9lcsnGgATnl6b hWyMZ6+XGgGcu4E9ChWulIf7Yw4L1AKKiwZycBQzdEY2POVOOwOU5SVWnYdLRFFWB8a1 IS7Q== X-Forwarded-Encrypted: i=1; AJvYcCXBy6W0fhnKZQwNQjT4A4qzcDVjWK434l83WCb/+6Vzvkpg3SKHDf78Kc7rSUClSXHQ4HyCdoDybt0FMgHOb1nL6svdjat1/aXPIOMheX/6v9Si3Ms= X-Gm-Message-State: AOJu0YwyxdcYc5bzbPnhGaRezi58M3JD8cMBIU1V5U1VXcvQwX9Bf/zN RD1AV2Is8ieEzgv1u4f1hyo162/GOkiyAGYSgylPh2FeXW4W/u8W 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 <javier.carrasco.cruz@gmail.com> 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <tharvey@gateworks.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>, Baojun Xu <baojun.xu@ti.com>, Olivier Moysan <olivier.moysan@foss.st.com>, Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Masami Hiramatsu <mhiramat@kernel.org> 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 <javier.carrasco.cruz@gmail.com> 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_023751_830511_E279FD7D X-CRM114-Status: GOOD ( 13.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
{ASoC,media}: constify snd_soc_component_driver when used as read-only
|
expand
|
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,
`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 <javier.carrasco.cruz@gmail.com> --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)