From: Dan Carpenter <dan.carpenter@linaro.org>
To: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Thorsten Blum <thorsten.blum@linux.dev>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] ASoC: codecs: simplify aw87390_init() argument a bit
Date: Sat, 1 Nov 2025 16:27:21 +0300 [thread overview]
Message-ID: <aQYKuQuKekmoUrHP@stanley.mountain> (raw)
Just pass "aw87390" instead of the address of it. It's a bit simpler.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
sound/soc/codecs/aw87390.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/aw87390.c b/sound/soc/codecs/aw87390.c
index 460b782e96a1..d7fd865c349f 100644
--- a/sound/soc/codecs/aw87390.c
+++ b/sound/soc/codecs/aw87390.c
@@ -360,7 +360,7 @@ static void aw87390_parse_channel_dt(struct aw87390 *aw87390)
aw_dev->channel = channel_value;
}
-static int aw87390_init(struct aw87390 **aw87390, struct i2c_client *i2c, struct regmap *regmap)
+static int aw87390_init(struct aw87390 *aw87390, struct i2c_client *i2c, struct regmap *regmap)
{
struct aw_device *aw_dev;
unsigned int chip_id;
@@ -384,7 +384,7 @@ static int aw87390_init(struct aw87390 **aw87390, struct i2c_client *i2c, struct
if (!aw_dev)
return -ENOMEM;
- (*aw87390)->aw_pa = aw_dev;
+ aw87390->aw_pa = aw_dev;
aw_dev->i2c = i2c;
aw_dev->regmap = regmap;
aw_dev->dev = &i2c->dev;
@@ -398,7 +398,7 @@ static int aw87390_init(struct aw87390 **aw87390, struct i2c_client *i2c, struct
aw_dev->prof_index = AW87390_INIT_PROFILE;
aw_dev->status = AW87390_DEV_PW_OFF;
- aw87390_parse_channel_dt(*aw87390);
+ aw87390_parse_channel_dt(aw87390);
return 0;
}
@@ -426,7 +426,7 @@ static int aw87390_i2c_probe(struct i2c_client *i2c)
"failed to init regmap\n");
/* aw pa init */
- ret = aw87390_init(&aw87390, i2c, aw87390->regmap);
+ ret = aw87390_init(aw87390, i2c, aw87390->regmap);
if (ret)
return ret;
--
2.51.0
next reply other threads:[~2025-11-01 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 13:27 Dan Carpenter [this message]
2025-11-04 13:24 ` [PATCH] ASoC: codecs: simplify aw87390_init() argument a bit 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=aQYKuQuKekmoUrHP@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=thorsten.blum@linux.dev \
--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