]> www.infradead.org Git - users/hch/configfs.git/commitdiff
ASoC: amd: acp: move chip->flag variable assignment
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Mon, 17 Jun 2024 07:28:36 +0000 (12:58 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 19 Jun 2024 17:32:06 +0000 (18:32 +0100)
chip->flag variable assignment will be skipped when acp platform device
creation is skipped. In this case chip>flag value will not be set.
chip->flag variable should be assigned along with other structure
variables for 'chip' structure. Move chip->flag variable assignment
prior to acp platform device creation.

Fixes: 3a94c8ad0aae ("ASoC: amd: acp: add code for scanning acp pdm controller")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-pci.c

index aa3e72d134518a9d6b2a49d20fc1b97d54486dcd..777b5a78d8a9ef1a1ab1c0b1026c0c34d83d6b58 100644 (file)
@@ -100,6 +100,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
                ret = -EINVAL;
                goto release_regions;
        }
+       chip->flag = flag;
        dmic_dev = platform_device_register_data(dev, "dmic-codec", PLATFORM_DEVID_NONE, NULL, 0);
        if (IS_ERR(dmic_dev)) {
                dev_err(dev, "failed to create DMIC device\n");
@@ -139,7 +140,6 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
                }
        }
 
-       chip->flag = flag;
        memset(&pdevinfo, 0, sizeof(pdevinfo));
 
        pdevinfo.name = chip->name;