ASoC: SOF: Intel: hda-mlink: initialize instance_offset member
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 12 May 2023 17:46:10 +0000 (12:46 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 15 May 2023 01:20:13 +0000 (10:20 +0900)
We defined the values but never initialized it for SoundWire/SSP, fix
this miss.

A Fixes: tag is not provided as instance_offset was not used so far,
so nothing was really broken. This patch is only required for the
SoundWire support in the following patch.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Link: https://lore.kernel.org/r/20230512174611.84372-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
sound/soc/sof/intel/hda-mlink.c

index c540b1d..2d0c5d5 100644 (file)
@@ -140,6 +140,7 @@ static int hdaml_lnk_enum(struct device *dev, struct hdac_ext2_link *h2link,
 
        switch (h2link->elid) {
        case AZX_REG_ML_LEPTR_ID_SDW:
+               h2link->instance_offset = AZX_REG_SDW_INSTANCE_OFFSET;
                h2link->shim_offset = AZX_REG_SDW_SHIM_OFFSET;
                h2link->ip_offset = AZX_REG_SDW_IP_OFFSET;
                h2link->shim_vs_offset = AZX_REG_SDW_VS_SHIM_OFFSET;
@@ -154,6 +155,7 @@ static int hdaml_lnk_enum(struct device *dev, struct hdac_ext2_link *h2link,
                        link_idx, base_offset);
                break;
        case AZX_REG_ML_LEPTR_ID_INTEL_SSP:
+               h2link->instance_offset = AZX_REG_INTEL_SSP_INSTANCE_OFFSET;
                h2link->shim_offset = AZX_REG_INTEL_SSP_SHIM_OFFSET;
                h2link->ip_offset = AZX_REG_INTEL_SSP_IP_OFFSET;
                h2link->shim_vs_offset = AZX_REG_INTEL_SSP_VS_SHIM_OFFSET;