PCI: Add pci_get_domain_bus_and_slot() stub
authorRandy Dunlap <rdunlap@infradead.org>
Wed, 6 Dec 2017 20:55:05 +0000 (14:55 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 6 Dec 2017 20:55:05 +0000 (14:55 -0600)
commit7912af5c835bd86f2b0347a480e0f40e2fab30d0
treee82d6fd0f77f8aa22823276c4886d9d56136dcea
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
PCI: Add pci_get_domain_bus_and_slot() stub

The coretemp driver build fails when CONFIG_PCI is not enabled because it
uses a function that does not have a stub for that config case, so add the
function stub.

  ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
  ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
    struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
  ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
    struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
[bhelgaas: identical patch also by Arnd Bergmann <arnd@arndb.de>]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
include/linux/pci.h