]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: mediatek: mt8173-afe-pcm: use local `dev` pointer in driver callbacks
authorChen-Yu Tsai <wenst@chromium.org>
Thu, 12 Jun 2025 07:48:59 +0000 (15:48 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 12 Jun 2025 12:45:37 +0000 (13:45 +0100)
commitb2c090c9f6aa9d19f4c966233d7fcb872255f83b
tree91294c045288c7205a2131e83511b1931b0d49a7
parent9e7bc5cb8d089d9799e17a9ac99c5da9b13b02e3
ASoC: mediatek: mt8173-afe-pcm: use local `dev` pointer in driver callbacks

The probe and remove functions in the mt8183-afe-pcm driver repeatedly uses
`&pdev->dev` for |struct device *|, but then assigns this value to
`afe->dev` and uses that in other places in the same function.

Store `&pdev->dev` in a local pointer and use that exclusively to avoid
the numerous dereferences and to make the code more consistent. Lines
are reflowed where it makes sense.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20250612074901.4023253-9-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c