ASoC: AMD Raven/Renoir - fix the PCI probe (PCI revision)
Subsystems (3)
Jaroslav Kysela
maintainerPATCH 1/1 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.
Signed-off-by Jaroslav Kysela <[email protected]>
--- sound/soc/amd/raven/pci-acp3x.c | 4 ++++ sound/soc/amd/renoir/rn-pci-acp3x.c | 4 ++++ 2 files changed, 8 insertions(+)
sound/soc/amd/raven/pci-acp3x.c +4 -0
@@ -118,6 +118,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,int ret, i;u32 addr, val; +/* Raven device detection */ +if (pci->revision !=0x00 ) +return -ENODEV ; +if (pci_enable_device (pci)) {dev_err (&pci->dev,"pci_enable_device failed\n" );return -ENODEV ;
sound/soc/amd/renoir/rn-pci-acp3x.c +4 -0
@@ -188,6 +188,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 ;
Signature · 1 line
2.26.2