mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
	Baojun Xu <baojun.xu@ti.com>, Sen Wang <sen@ti.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] ASoC: tlv320aic32x4: do not make clocks bulk data static
Date: Sat, 25 Jul 2026 18:05:15 -0700	[thread overview]
Message-ID: <20260726010519.117805-5-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20260726010519.117805-1-dmitry.torokhov@gmail.com>

Declaring local clk_bulk_data structures as static inside functions is bad
practice even if the driver is currently a singleton, because it relies on
mutable function-static state and interferes with multi-instance safety or
clean re-probing.

Remove static from the clocks bulk data arrays across the driver.

Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 sound/soc/codecs/tlv320aic32x4.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 72be757f559c..690acfc005c2 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -717,7 +717,7 @@ static int aic32x4_setup_clocks(struct snd_soc_component *component,
 	unsigned long adc_clock_rate, dac_clock_rate;
 	int ret;
 
-	static struct clk_bulk_data clocks[] = {
+	struct clk_bulk_data clocks[] = {
 		{ .id = "pll" },
 		{ .id = "nadc" },
 		{ .id = "madc" },
@@ -886,7 +886,7 @@ static int aic32x4_set_bias_level(struct snd_soc_component *component,
 	struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
 	int ret;
 
-	static struct clk_bulk_data clocks[] = {
+	struct clk_bulk_data clocks[] = {
 		{ .id = "madc" },
 		{ .id = "mdac" },
 		{ .id = "bdiv" },
@@ -972,7 +972,7 @@ static int aic32x4_component_probe(struct snd_soc_component *component)
 	u32 tmp_reg;
 	int ret;
 
-	static struct clk_bulk_data clocks[] = {
+	struct clk_bulk_data clocks[] = {
 		{ .id = "codec_clkin" },
 		{ .id = "pll" },
 		{ .id = "bdiv" },
@@ -1128,7 +1128,7 @@ static int aic32x4_tas2505_component_probe(struct snd_soc_component *component)
 	u32 tmp_reg;
 	int ret;
 
-	static struct clk_bulk_data clocks[] = {
+	struct clk_bulk_data clocks[] = {
 		{ .id = "codec_clkin" },
 		{ .id = "pll" },
 		{ .id = "bdiv" },
-- 
2.55.0.229.g6434b31f56-goog


  parent reply	other threads:[~2026-07-26  1:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26  1:05 [PATCH 1/7] ASoC: tlv320aic32x4: remove global header with platform data Dmitry Torokhov
2026-07-26  1:05 ` [PATCH 2/7] ASoC: tlv320aic32x4: do not allocate gpio config separately Dmitry Torokhov
2026-07-26  1:05 ` [PATCH 3/7] ASoC: tlv320aic32x4: consolidate programming functions Dmitry Torokhov
2026-07-26  1:05 ` [PATCH 4/7] ASoC: tlv320aic32x4: move regmap_config into i2c and spi drivers Dmitry Torokhov
2026-07-26  1:05 ` Dmitry Torokhov [this message]
2026-07-26  1:05 ` [PATCH 6/7] ASoC: tlv320aic32x4: factor out rate configuration helper Dmitry Torokhov
2026-07-26  1:05 ` [PATCH 7/7] ASoC: tlv320aic32x4: clean up driver code formatting and logging Dmitry Torokhov
2026-07-29 23:18 ` [PATCH 1/7] ASoC: tlv320aic32x4: remove global header with platform data Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260726010519.117805-5-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sen@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®