]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: hdmi: Remove redundant variables
authorMaxime Ripard <maxime@cerno.tech>
Wed, 7 Jul 2021 09:36:31 +0000 (11:36 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 29 Jul 2021 08:41:16 +0000 (10:41 +0200)
commit3aea7c16b7d8b2613c0f93cf4b5d68eb40f9e814
tree48829b2ae55d9bd6bfa7c981613430ce160804c0
parent8264217f3e54b90d28d4d5f192a21bc8a7e4c20e
drm/vc4: hdmi: Remove redundant variables

The vc4_hdmi_audio_prepare function and the functions it's calling have
in several occurences multiple dereferences of either the sample rate or
the number of channels.

It turns out that these variables are also passed through the hdmi codec
parameters structure. Convert all the users to use this structure, and
if it's used multiple times use a variable to store it instead of
dereferencing it every time.

Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210707093632.1468127-1-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_hdmi.h