diff options
author | Jaroslav Kysela <perex@perex.cz> | 2020-12-08 21:12:33 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-12-09 15:12:59 +0300 |
commit | 55d8e6a85bce21f748c42eedea63681219f70523 (patch) | |
tree | fab11ffc3a4b652d4714b8e50e31c628ac5ad73e /sound/soc/amd/renoir | |
parent | 3cea33b6f2d7782d1be17c71509986f33ee93541 (diff) | |
download | linux-55d8e6a85bce21f748c42eedea63681219f70523.tar.xz |
ASoC: AMD Raven/Renoir - fix the PCI probe (PCI revision)
The Raven and Renoir ACP can be distinguished by the PCI revision.
Let's do the check very early, otherwise the wrong probe code
can be run.
Link: https://lore.kernel.org/alsa-devel/2e4587f8-f602-cf23-4845-fd27a32b1cfc@amd.com/
Cc: <stable@kernel.org>
Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20201208181233.2745726-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/renoir')
-rw-r--r-- | sound/soc/amd/renoir/rn-pci-acp3x.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c index 877350f38a68..d9e6e49bff01 100644 --- a/sound/soc/amd/renoir/rn-pci-acp3x.c +++ b/sound/soc/amd/renoir/rn-pci-acp3x.c @@ -176,6 +176,10 @@ static int snd_rn_acp_probe(struct pci_dev *pci, int ret, index; u32 addr; + /* Renoir device check */ + if (pci->revision != 0x01) + return -ENODEV; + if (pci_enable_device(pci)) { dev_err(&pci->dev, "pci_enable_device failed\n"); return -ENODEV; |