]> 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)
commit005b8f5d3b4cca531e82dd9c2c85cc0c5c1b688e
tree48829b2ae55d9bd6bfa7c981613430ce160804c0
parentb7cdc971eb1e8db352f74ac4b29709ded611be22
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