Commit 92864de4 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230418074630.8681-3-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent fa92f429
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment