summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-04-18 09:46:29 +0200
committerMark Brown <broonie@kernel.org>2023-04-18 14:02:23 +0100
commit92864de45c3e445419d1e99e3a409469a5f3ef57 (patch)
treea48546c9ab12ef69f270729977fc99f905b29e5c /sound/soc
parentfa92f4294283cc7d1f29151420be9e9336182518 (diff)
downloadlinux-stable-92864de45c3e445419d1e99e3a409469a5f3ef57.tar.gz
linux-stable-92864de45c3e445419d1e99e3a409469a5f3ef57.tar.bz2
linux-stable-92864de45c3e445419d1e99e3a409469a5f3ef57.zip
ASoC: codecs: wcd934x: Simplify &pdev->dev in probe
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/20230418074630.8681-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wcd934x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
index 56487ad2f048..c0d1fa36d841 100644
--- a/sound/soc/codecs/wcd934x.c
+++ b/sound/soc/codecs/wcd934x.c
@@ -5892,12 +5892,12 @@ static int wcd934x_codec_parse_data(struct wcd934x_codec *wcd)
static int wcd934x_codec_probe(struct platform_device *pdev)
{
- struct wcd934x_ddata *data = dev_get_drvdata(pdev->dev.parent);
- struct wcd934x_codec *wcd;
struct device *dev = &pdev->dev;
+ struct wcd934x_ddata *data = dev_get_drvdata(dev->parent);
+ struct wcd934x_codec *wcd;
int ret, irq;
- wcd = devm_kzalloc(&pdev->dev, sizeof(*wcd), GFP_KERNEL);
+ wcd = devm_kzalloc(dev, sizeof(*wcd), GFP_KERNEL);
if (!wcd)
return -ENOMEM;