device: Use pcidev_path_behind()

Change-Id: Iac16f9412d0e6aac908d873c61a4de3935e5318a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/26518
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki
2018-05-23 20:00:16 +03:00
committed by Felix Held
parent e7377556cc
commit a144e4d6fa
7 changed files with 14 additions and 14 deletions

View File

@@ -30,7 +30,7 @@ void amd8111_enable(struct device *dev)
{
unsigned devfn;
devfn = bus_dev->path.pci.devfn + (1 << 3);
lpc_dev = dev_find_slot(bus_dev->bus->secondary, devfn);
lpc_dev = pcidev_path_behind(bus_dev->bus, devfn);
index = ((dev->path.pci.devfn & ~7) >> 3) + 8;
if (dev->path.pci.devfn == 2) { /* EHCI */
index = 16;
@@ -38,7 +38,7 @@ void amd8111_enable(struct device *dev)
} else {
unsigned devfn;
devfn = (dev->path.pci.devfn) & ~7;
lpc_dev = dev_find_slot(dev->bus->secondary, devfn);
lpc_dev = pcidev_path_behind(dev->bus, devfn);
index = dev->path.pci.devfn & 7;
}
if ((!lpc_dev) || (index >= 17)) {

View File

@@ -27,7 +27,7 @@ static struct device *find_sm_dev(struct device *dev, u32 devfn)
{
struct device *sm_dev;
sm_dev = dev_find_slot(dev->bus->secondary, devfn);
sm_dev = pcidev_path_behind(dev->bus, devfn);
if (!sm_dev)
return sm_dev;

View File

@@ -28,7 +28,7 @@ static struct device *find_sm_dev(struct device *dev, u32 devfn)
{
struct device *sm_dev;
sm_dev = dev_find_slot(dev->bus->secondary, devfn);
sm_dev = pcidev_path_behind(dev->bus, devfn);
if (!sm_dev)
return sm_dev;