Blame view
include/linux/pci-acpi.h
1.25 KB
1da177e4c
|
1 2 3 4 5 6 7 8 9 |
/* * File pci-acpi.h * * Copyright (C) 2004 Intel * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) */ #ifndef _PCI_ACPI_H_ #define _PCI_ACPI_H_ |
8b62091e2
|
10 |
#include <linux/acpi.h> |
1da177e4c
|
11 |
#ifdef CONFIG_ACPI |
b67ea7617
|
12 13 14 15 16 17 |
extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev, struct pci_bus *pci_bus); extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev); extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev, struct pci_dev *pci_dev); extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev); |
056c58e8e
|
18 19 |
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) { |
d18690af6
|
20 21 |
struct pci_bus *pbus = pdev->bus; /* Find a PCI root bus */ |
a222b8f83
|
22 |
while (!pci_is_root_bus(pbus)) |
d18690af6
|
23 24 25 |
pbus = pbus->parent; return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), pbus->number); |
056c58e8e
|
26 |
} |
e8c331e96
|
27 28 29 |
static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) { |
84845c070
|
30 |
if (!pci_is_root_bus(pbus)) |
0747aaf42
|
31 32 33 |
return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), pbus->number); |
e8c331e96
|
34 |
} |
1da177e4c
|
35 |
#endif |
415e12b23
|
36 37 38 39 40 |
#ifdef CONFIG_ACPI_APEI extern bool aer_acpi_firmware_first(void); #else static inline bool aer_acpi_firmware_first(void) { return false; } #endif |
1da177e4c
|
41 |
#endif /* _PCI_ACPI_H_ */ |