aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-03-15 07:09:26 -0400
committerMark Brown <broonie@kernel.org>2016-03-16 06:08:43 -0400
commit077411e5eb8872736fdc5f3e7277719160918dde (patch)
treef89a253ccac2e370741711285fff19032f2af250 /sound/soc/intel/skylake
parent3f7f8489e25b180cf8de8a3ae3896b3f18fc4aa5 (diff)
ASoC: Intel: Skylake: Unmap the address last
In Skylake destructor we unmap the hardware address and then free links and streams. The stream free accesses hardware to write to registers and predictably causes oops. So change the order and unmap last in destructor. 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>
Diffstat (limited to 'sound/soc/intel/skylake')
-rw-r--r--sound/soc/intel/skylake/skl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 292d51db9a22..6e916c3c3a4b 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -316,12 +316,13 @@ static int skl_free(struct hdac_ext_bus *ebus)
316 316
317 if (bus->irq >= 0) 317 if (bus->irq >= 0)
318 free_irq(bus->irq, (void *)bus); 318 free_irq(bus->irq, (void *)bus);
319 if (bus->remap_addr)
320 iounmap(bus->remap_addr);
321
322 snd_hdac_bus_free_stream_pages(bus); 319 snd_hdac_bus_free_stream_pages(bus);
323 snd_hdac_stream_free_all(ebus); 320 snd_hdac_stream_free_all(ebus);
324 snd_hdac_link_free_all(ebus); 321 snd_hdac_link_free_all(ebus);
322
323 if (bus->remap_addr)
324 iounmap(bus->remap_addr);
325
325 pci_release_regions(skl->pci); 326 pci_release_regions(skl->pci);
326 pci_disable_device(skl->pci); 327 pci_disable_device(skl->pci);
327 328