Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

This commit is contained in:
David S. Miller 2013-08-16 15:37:26 -07:00
commit 2ff1cf12c9
357 changed files with 3306 additions and 1865 deletions

View file

@ -317,13 +317,20 @@ void acpi_pci_remove_bus(struct pci_bus *bus)
/* ACPI bus type */
static int acpi_pci_find_device(struct device *dev, acpi_handle *handle)
{
struct pci_dev * pci_dev;
u64 addr;
struct pci_dev *pci_dev = to_pci_dev(dev);
bool is_bridge;
u64 addr;
pci_dev = to_pci_dev(dev);
/*
* pci_is_bridge() is not suitable here, because pci_dev->subordinate
* is set only after acpi_pci_find_device() has been called for the
* given device.
*/
is_bridge = pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE
|| pci_dev->hdr_type == PCI_HEADER_TYPE_CARDBUS;
/* Please ref to ACPI spec for the syntax of _ADR */
addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn);
*handle = acpi_get_child(DEVICE_ACPI_HANDLE(dev->parent), addr);
*handle = acpi_find_child(ACPI_HANDLE(dev->parent), addr, is_bridge);
if (!*handle)
return -ENODEV;
return 0;