aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_hdmi.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-07-07 11:36:31 +0200
committerMaxime Ripard <maxime@cerno.tech>2021-07-29 10:41:16 +0200
commitf143778d90829ac37e6a481772dc0f26e3071de7 (patch)
tree48829b2ae55d9bd6bfa7c981613430ce160804c0 /drivers/gpu/drm/vc4/vc4_hdmi.h
parentdrm: clarify usage of drm leases (diff)
downloadlinux-dev-f143778d90829ac37e6a481772dc0f26e3071de7.tar.xz
linux-dev-f143778d90829ac37e6a481772dc0f26e3071de7.zip
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
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h
index b6697b695f71..33e9f665ab8e 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.h
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
@@ -111,8 +111,6 @@ struct vc4_hdmi_audio {
struct snd_soc_dai_link_component cpu;
struct snd_soc_dai_link_component codec;
struct snd_soc_dai_link_component platform;
- int samplerate;
- int channels;
struct snd_dmaengine_dai_dma_data dma_data;
struct hdmi_audio_infoframe infoframe;
bool streaming;