]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: amd: acp: Fix acp_resource duplicate symbol error
authorVenkata Prasad Potturu <venkataprasad.potturu@amd.com>
Mon, 17 Mar 2025 07:24:08 +0000 (12:54 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 17 Mar 2025 10:16:33 +0000 (10:16 +0000)
Fix acp_resource structure duplicate defination error by adding
export symbol and extern keyword in header file.

ld.lld: error: duplicate symbol: acp63_rsrc
ld.lld: error: duplicate symbol: acp70_rsrc

Fixes: f8b4f3f525e8 ("ASoC: amd: acp: Refactor acp70 platform resource structure")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503160801.yExt0K2E-lkp@intel.com/
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250317072413.88971-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-legacy-common.c
sound/soc/amd/acp/amd.h

index 255f90ca956afd2fddcdb3f6c19f949bdbdee951..5fad6c4a8d86e6610ef04b0f3f5eaa6bc2465578 100644 (file)
 #define ACP63_PDM_ADDR         0x02
 #define ACP70_PDM_ADDR         0x02
 
+struct acp_resource rn_rsrc = {
+       .offset = 20,
+       .no_of_ctrls = 1,
+       .irqp_used = 0,
+       .irq_reg_offset = 0x1800,
+       .scratch_reg_offset = 0x12800,
+       .sram_pte_offset = 0x02052800,
+};
+EXPORT_SYMBOL_NS_GPL(rn_rsrc, "SND_SOC_ACP_COMMON");
+
+struct acp_resource rmb_rsrc = {
+       .offset = 0,
+       .no_of_ctrls = 2,
+       .irqp_used = 1,
+       .soc_mclk = true,
+       .irq_reg_offset = 0x1a00,
+       .scratch_reg_offset = 0x12800,
+       .sram_pte_offset = 0x03802800,
+};
+EXPORT_SYMBOL_NS_GPL(rmb_rsrc, "SND_SOC_ACP_COMMON");
+
+struct acp_resource acp63_rsrc = {
+       .offset = 0,
+       .no_of_ctrls = 2,
+       .irqp_used = 1,
+       .soc_mclk = true,
+       .irq_reg_offset = 0x1a00,
+       .scratch_reg_offset = 0x12800,
+       .sram_pte_offset = 0x03802800,
+};
+EXPORT_SYMBOL_NS_GPL(acp63_rsrc, "SND_SOC_ACP_COMMON");
+
+struct acp_resource acp70_rsrc = {
+       .offset = 0,
+       .no_of_ctrls = 2,
+       .irqp_used = 1,
+       .soc_mclk = true,
+       .irq_reg_offset = 0x1a00,
+       .scratch_reg_offset = 0x10000,
+       .sram_pte_offset = 0x03800000,
+};
+EXPORT_SYMBOL_NS_GPL(acp70_rsrc, "SND_SOC_ACP_COMMON");
+
 const struct snd_acp_hw_ops acp_common_hw_ops = {
        /* ACP hardware initilizations */
        .acp_init = acp_init,
index 928aa60ab386233967d0075aeef3536c3bb4f512..863e74fcee437eb042ae951d23f2436eabb88dfa 100644 (file)
@@ -238,44 +238,10 @@ enum acp_config {
        ACP_CONFIG_20,
 };
 
-struct acp_resource rn_rsrc = {
-       .offset = 20,
-       .no_of_ctrls = 1,
-       .irqp_used = 0,
-       .irq_reg_offset = 0x1800,
-       .scratch_reg_offset = 0x12800,
-       .sram_pte_offset = 0x02052800,
-};
-
-struct acp_resource rmb_rsrc = {
-       .offset = 0,
-       .no_of_ctrls = 2,
-       .irqp_used = 1,
-       .soc_mclk = true,
-       .irq_reg_offset = 0x1a00,
-       .scratch_reg_offset = 0x12800,
-       .sram_pte_offset = 0x03802800,
-};
-
-struct acp_resource acp63_rsrc = {
-       .offset = 0,
-       .no_of_ctrls = 2,
-       .irqp_used = 1,
-       .soc_mclk = true,
-       .irq_reg_offset = 0x1a00,
-       .scratch_reg_offset = 0x12800,
-       .sram_pte_offset = 0x03802800,
-};
-
-struct acp_resource acp70_rsrc = {
-       .offset = 0,
-       .no_of_ctrls = 2,
-       .irqp_used = 1,
-       .soc_mclk = true,
-       .irq_reg_offset = 0x1a00,
-       .scratch_reg_offset = 0x10000,
-       .sram_pte_offset = 0x03800000,
-};
+extern struct acp_resource rn_rsrc;
+extern struct acp_resource rmb_rsrc;
+extern struct acp_resource acp63_rsrc;
+extern struct acp_resource acp70_rsrc;
 
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines;
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines;