summaryrefslogtreecommitdiff
path: root/sound/soc/intel/skylake/skl.h
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2016-05-05 05:49:19 (GMT)
committerMark Brown <broonie@kernel.org>2016-05-05 15:46:54 (GMT)
commitc286b3f9600b2ddc573208792d947e1a251c6b15 (patch)
tree79e3d3de90ab01d241e775e1ec9d54c1ceb33b0e /sound/soc/intel/skylake/skl.h
parent551f4bc86807637098786c78afb78418ada4aa1f (diff)
downloadlinux-c286b3f9600b2ddc573208792d947e1a251c6b15.tar.xz
ASoC: Intel: Skylake: Fix memory leak in nhlt init
During skl_nhlt_init(), acpi obj pointer is allocated and never freed and remap address is not unmapped. To fix this we should release the ACPI obj and also unmap the nhlt address during cleanup of driver. 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/skl.h')
-rw-r--r--sound/soc/intel/skylake/skl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h
index 39e16fa..4b4b387 100644
--- a/sound/soc/intel/skylake/skl.h
+++ b/sound/soc/intel/skylake/skl.h
@@ -66,7 +66,7 @@ struct skl {
struct platform_device *dmic_dev;
struct platform_device *i2s_dev;
- void *nhlt; /* nhlt ptr */
+ struct nhlt_acpi_table *nhlt; /* nhlt ptr */
struct skl_sst *skl_sst; /* sst skl ctx */
struct skl_dsp_resource resource;
@@ -103,8 +103,8 @@ struct skl_dsp_ops {
int skl_platform_unregister(struct device *dev);
int skl_platform_register(struct device *dev);
-void *skl_nhlt_init(struct device *dev);
-void skl_nhlt_free(void *addr);
+struct nhlt_acpi_table *skl_nhlt_init(struct device *dev);
+void skl_nhlt_free(struct nhlt_acpi_table *addr);
struct nhlt_specific_cfg *skl_get_ep_blob(struct skl *skl, u32 instance,
u8 link_type, u8 s_fmt, u8 no_ch, u32 s_rate, u8 dirn);