Skip to content

Commit 92864de

Browse files
krzkbroonie
authored andcommitted
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>
1 parent fa92f42 commit 92864de

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sound/soc/codecs/wcd934x.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5892,12 +5892,12 @@ static int wcd934x_codec_parse_data(struct wcd934x_codec *wcd)
58925892

58935893
static int wcd934x_codec_probe(struct platform_device *pdev)
58945894
{
5895-
struct wcd934x_ddata *data = dev_get_drvdata(pdev->dev.parent);
5896-
struct wcd934x_codec *wcd;
58975895
struct device *dev = &pdev->dev;
5896+
struct wcd934x_ddata *data = dev_get_drvdata(dev->parent);
5897+
struct wcd934x_codec *wcd;
58985898
int ret, irq;
58995899

5900-
wcd = devm_kzalloc(&pdev->dev, sizeof(*wcd), GFP_KERNEL);
5900+
wcd = devm_kzalloc(dev, sizeof(*wcd), GFP_KERNEL);
59015901
if (!wcd)
59025902
return -ENOMEM;
59035903

0 commit comments

Comments
 (0)