ASoC: Intel: Skylake: Call i915 exit last
authorVinod Koul <vinod.koul@intel.com>
Tue, 15 Mar 2016 11:09:27 +0000 (16:39 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 16 Mar 2016 10:08:43 +0000 (10:08 +0000)
The Skylake driver uses i915 component APIs to talk to display.
On remove we should free up by invoking snd_hdac_i915_exit() but
that should be last thing in remove routine, so move it to last
in skl_free()

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl.c

index 6e916c3c3a4babd1996dfeed941fc400d54f9ec6..72971dc55c524e0f602dd6320914c8e6d488ceb2 100644 (file)
@@ -328,6 +328,8 @@ static int skl_free(struct hdac_ext_bus *ebus)
 
        snd_hdac_ext_bus_exit(ebus);
 
+       if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
+               snd_hdac_i915_exit(&ebus->bus);
        return 0;
 }
 
@@ -720,9 +722,6 @@ static void skl_remove(struct pci_dev *pci)
        if (skl->tplg)
                release_firmware(skl->tplg);
 
-       if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
-               snd_hdac_i915_exit(&ebus->bus);
-
        if (pci_dev_run_wake(pci))
                pm_runtime_get_noresume(&pci->dev);
        pci_dev_put(pci);