Commit d8739971 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: Intel: hda-dai: fix compilation warning in pcm_prepare

Fix GCC warning with W=1, previous cleanup did not remove unnecessary
variable.

sound/soc/sof/intel/hda-dai.c: In function ‘hda_link_pcm_prepare’:

sound/soc/sof/intel/hda-dai.c:265:31: warning: variable ‘hda_stream’
set but not used [-Wunused-but-set-variable]
  265 |  struct sof_intel_hda_stream *hda_stream;
      |                               ^~~~~~~~~~

Fixes: a3ebccb5 ("ASoC: SOF: Intel: hda: reset link DMA state in prepare")
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200113205620.27285-1-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent fed4383c
...@@ -262,14 +262,11 @@ static int hda_link_pcm_prepare(struct snd_pcm_substream *substream, ...@@ -262,14 +262,11 @@ static int hda_link_pcm_prepare(struct snd_pcm_substream *substream,
{ {
struct hdac_ext_stream *link_dev = struct hdac_ext_stream *link_dev =
snd_soc_dai_get_dma_data(dai, substream); snd_soc_dai_get_dma_data(dai, substream);
struct sof_intel_hda_stream *hda_stream;
struct snd_sof_dev *sdev = struct snd_sof_dev *sdev =
snd_soc_component_get_drvdata(dai->component); snd_soc_component_get_drvdata(dai->component);
struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream);
int stream = substream->stream; int stream = substream->stream;
hda_stream = hstream_to_sof_hda_stream(link_dev);
if (link_dev->link_prepared) if (link_dev->link_prepared)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment