Skip to content

Commit fd6e4da

Browse files
committed
ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
JIRA: https://issues.redhat.com/browse/RHEL-101627 commit 0779c0a Author: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Date: Mon Jun 9 17:42:32 2025 +0530 ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures This patch modifies the assignment of machine structure pointers in the acp_pci_probe function. Previously, the machine pointers were assigned using the address-of operator (&), which caused incompatibility issues in type assignments. Additionally, the declarations of the machine arrays in amd.h have been updated to reflect that they are indeed arrays (`[]`). The code is further cleaned up by declaring the codec structures in amd-acpi-mach.c as static, reflecting their intended usage. error: symbol 'amp_rt1019' was not declared. Should it be static? error: symbol 'amp_max' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_acp_machines' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_rmb_acp_machines' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_acp63_acp_machines' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_acp70_acp_machines' was not declared. Should it be static? Fixes: 9c2c0ef ("ASoC: amd: acp: Fix snd_soc_acpi_mach id's duplicate symbol error") Link: thesofproject/linux#5438 Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20250609121251.639080-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent f72c953 commit fd6e4da

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

sound/soc/amd/acp/acp-pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,26 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
137137
chip->name = "acp_asoc_renoir";
138138
chip->rsrc = &rn_rsrc;
139139
chip->acp_hw_ops_init = acp31_hw_ops_init;
140-
chip->machines = &snd_soc_acpi_amd_acp_machines;
140+
chip->machines = snd_soc_acpi_amd_acp_machines;
141141
break;
142142
case 0x6f:
143143
chip->name = "acp_asoc_rembrandt";
144144
chip->rsrc = &rmb_rsrc;
145145
chip->acp_hw_ops_init = acp6x_hw_ops_init;
146-
chip->machines = &snd_soc_acpi_amd_rmb_acp_machines;
146+
chip->machines = snd_soc_acpi_amd_rmb_acp_machines;
147147
break;
148148
case 0x63:
149149
chip->name = "acp_asoc_acp63";
150150
chip->rsrc = &acp63_rsrc;
151151
chip->acp_hw_ops_init = acp63_hw_ops_init;
152-
chip->machines = &snd_soc_acpi_amd_acp63_acp_machines;
152+
chip->machines = snd_soc_acpi_amd_acp63_acp_machines;
153153
break;
154154
case 0x70:
155155
case 0x71:
156156
chip->name = "acp_asoc_acp70";
157157
chip->rsrc = &acp70_rsrc;
158158
chip->acp_hw_ops_init = acp70_hw_ops_init;
159-
chip->machines = &snd_soc_acpi_amd_acp70_acp_machines;
159+
chip->machines = snd_soc_acpi_amd_acp70_acp_machines;
160160
break;
161161
default:
162162
dev_err(dev, "Unsupported device revision:0x%x\n", pci->revision);

sound/soc/amd/acp/amd-acpi-mach.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
#include <sound/soc-acpi.h>
1010

11-
struct snd_soc_acpi_codecs amp_rt1019 = {
11+
static struct snd_soc_acpi_codecs amp_rt1019 = {
1212
.num_codecs = 1,
1313
.codecs = {"10EC1019"}
1414
};
1515

16-
struct snd_soc_acpi_codecs amp_max = {
16+
static struct snd_soc_acpi_codecs amp_max = {
1717
.num_codecs = 1,
1818
.codecs = {"MX98360A"}
1919
};

sound/soc/amd/acp/amd.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ extern struct acp_resource rmb_rsrc;
243243
extern struct acp_resource acp63_rsrc;
244244
extern struct acp_resource acp70_rsrc;
245245

246-
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines;
247-
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines;
248-
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines;
249-
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines;
246+
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines[];
247+
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines[];
248+
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines[];
249+
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines[];
250250

251251
extern const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops;
252252
extern const struct snd_soc_dai_ops acp_dmic_dai_ops;

0 commit comments

Comments
 (0)