Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: aw88261: pass pointer directly instead of passing the address
@ 2025-11-01 13:27 Dan Carpenter
  2025-11-04 13:24 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-11-01 13:27 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Thorsten Blum,
	Marco Crivellari, Kuninori Morimoto, linux-sound, linux-kernel,
	kernel-janitors

It's a little bit cleaner to just pass "aw88261" instead of the address
of it "&aw88261".

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 sound/soc/codecs/aw88261.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index 43556f66549e..8600b21ea618 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -1184,7 +1184,7 @@ static void aw88261_parse_channel_dt(struct aw88261 *aw88261)
 	aw_dev->channel = channel_value;
 }
 
-static int aw88261_init(struct aw88261 **aw88261, struct i2c_client *i2c, struct regmap *regmap)
+static int aw88261_init(struct aw88261 *aw88261, struct i2c_client *i2c, struct regmap *regmap)
 {
 	struct aw_device *aw_dev;
 	unsigned int chip_id;
@@ -1207,7 +1207,7 @@ static int aw88261_init(struct aw88261 **aw88261, struct i2c_client *i2c, struct
 	if (!aw_dev)
 		return -ENOMEM;
 
-	(*aw88261)->aw_pa = aw_dev;
+	aw88261->aw_pa = aw_dev;
 	aw_dev->i2c = i2c;
 	aw_dev->regmap = regmap;
 	aw_dev->dev = &i2c->dev;
@@ -1221,7 +1221,7 @@ static int aw88261_init(struct aw88261 **aw88261, struct i2c_client *i2c, struct
 	aw_dev->fade_step = AW88261_VOLUME_STEP_DB;
 	aw_dev->volume_desc.ctl_volume = AW88261_VOL_DEFAULT_VALUE;
 	aw_dev->volume_desc.mute_volume = AW88261_MUTE_VOL;
-	aw88261_parse_channel_dt(*aw88261);
+	aw88261_parse_channel_dt(aw88261);
 
 	return ret;
 }
@@ -1250,7 +1250,7 @@ static int aw88261_i2c_probe(struct i2c_client *i2c)
 	}
 
 	/* aw pa init */
-	ret = aw88261_init(&aw88261, i2c, aw88261->regmap);
+	ret = aw88261_init(aw88261, i2c, aw88261->regmap);
 	if (ret)
 		return ret;
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: codecs: aw88261: pass pointer directly instead of passing the address
  2025-11-01 13:27 [PATCH] ASoC: codecs: aw88261: pass pointer directly instead of passing the address Dan Carpenter
@ 2025-11-04 13:24 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-11-04 13:24 UTC (permalink / raw)
  To: Liam Girdwood, Dan Carpenter
  Cc: Jaroslav Kysela, Takashi Iwai, Thorsten Blum, Marco Crivellari,
	Kuninori Morimoto, linux-sound, linux-kernel, kernel-janitors

On Sat, 01 Nov 2025 16:27:34 +0300, Dan Carpenter wrote:
> It's a little bit cleaner to just pass "aw88261" instead of the address
> of it "&aw88261".
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: aw88261: pass pointer directly instead of passing the address
      commit: 84194c66aaf78fed150edb217b9f341518b1cba2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-04 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 13:27 [PATCH] ASoC: codecs: aw88261: pass pointer directly instead of passing the address Dan Carpenter
2025-11-04 13:24 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox