From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.15.y 1/4] ASoC: codecs: wsa881x: Simplify &pdev->dev in probe
Date: Tue, 20 Jan 2026 21:47:37 -0500 [thread overview]
Message-ID: <20260121024740.1145743-1-sashal@kernel.org> (raw)
In-Reply-To: <2026012029-possibly-cornhusk-03c3@gregkh>
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[ Upstream commit c617c9e7024d152426acf9f1aaf01070b6852f13 ]
The probe already stores pointer to &pdev->dev, so use it to make the
code a bit easier to read.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230102114152.297305-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 29d71b8a5a40 ("ASoC: codecs: wsa881x: fix unnecessary initialisation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/wsa881x.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index c8d3dc6341037..f4fef94bdf989 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -1101,20 +1101,20 @@ static int wsa881x_probe(struct sdw_slave *pdev,
{
struct wsa881x_priv *wsa881x;
- wsa881x = devm_kzalloc(&pdev->dev, sizeof(*wsa881x), GFP_KERNEL);
+ wsa881x = devm_kzalloc(dev, sizeof(*wsa881x), GFP_KERNEL);
if (!wsa881x)
return -ENOMEM;
- wsa881x->sd_n = devm_gpiod_get_optional(&pdev->dev, "powerdown",
+ wsa881x->sd_n = devm_gpiod_get_optional(dev, "powerdown",
GPIOD_FLAGS_BIT_NONEXCLUSIVE);
if (IS_ERR(wsa881x->sd_n)) {
dev_err(&pdev->dev, "Shutdown Control GPIO not found\n");
return PTR_ERR(wsa881x->sd_n);
}
- dev_set_drvdata(&pdev->dev, wsa881x);
+ dev_set_drvdata(dev, wsa881x);
wsa881x->slave = pdev;
- wsa881x->dev = &pdev->dev;
+ wsa881x->dev = dev;
wsa881x->sconfig.ch_count = 1;
wsa881x->sconfig.bps = 1;
wsa881x->sconfig.frame_rate = 48000;
@@ -1131,7 +1131,7 @@ static int wsa881x_probe(struct sdw_slave *pdev,
return PTR_ERR(wsa881x->regmap);
}
- return devm_snd_soc_register_component(&pdev->dev,
+ return devm_snd_soc_register_component(dev,
&wsa881x_component_drv,
wsa881x_dais,
ARRAY_SIZE(wsa881x_dais));
--
2.51.0
next prev parent reply other threads:[~2026-01-21 2:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 13:04 FAILED: patch "[PATCH] ASoC: codecs: wsa881x: fix unnecessary initialisation" failed to apply to 5.15-stable tree gregkh
2026-01-21 2:47 ` Sasha Levin [this message]
2026-01-21 2:47 ` [PATCH 5.15.y 2/4] ASoC: codecs: wsa881x: Use proper shutdown GPIO polarity Sasha Levin
2026-01-21 2:47 ` [PATCH 5.15.y 3/4] ASoC: codecs: wsa881x: Drop unused version readout Sasha Levin
2026-01-21 2:47 ` [PATCH 5.15.y 4/4] ASoC: codecs: wsa881x: fix unnecessary initialisation Sasha Levin
2026-02-03 16:13 ` [PATCH 5.15.y 1/4] ASoC: codecs: wsa881x: Simplify &pdev->dev in probe Greg KH
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=20260121024740.1145743-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=broonie@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=stable@vger.kernel.org \
/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