aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-09-18 05:48:43 -0400
committerMark Brown <broonie@kernel.org>2017-09-19 07:57:32 -0400
commit0607aa3cd824bddf85fa5174fe4be34af5a429fb (patch)
tree2681eac2b7489bcdaac4bc06256b0bba9e764ac2
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
ASoC: hdmi-codec: use sizeof_field rather than declaring hcp
Use FIELD_SIZEOF rather than declaring and initializing hcp. Remove unused variables. Cleans up clang warning: warning: Value stored to 'hcp' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/hdmi-codec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 3abf82563408..5672e516bec3 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -303,11 +303,8 @@ enum {
303static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol, 303static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol,
304 struct snd_ctl_elem_info *uinfo) 304 struct snd_ctl_elem_info *uinfo)
305{ 305{
306 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
307 struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
308
309 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; 306 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
310 uinfo->count = sizeof(hcp->eld); 307 uinfo->count = FIELD_SIZEOF(struct hdmi_codec_priv, eld);
311 308
312 return 0; 309 return 0;
313} 310}