diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-03 01:10:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-03 01:10:07 -0500 |
commit | 7a53c7f56bbfc9b0ef892e68f5cfae3d902544d1 (patch) | |
tree | 19dec256fc80ad06d631ece78b9eb68a457ce66b /drivers/acpi/pci_root.c | |
parent | e57130698fe3dd2b7d617d90bbf86474473cb40c (diff) | |
parent | 012abeea669ea49636cf952d13298bb68654146a (diff) |
Merge commit 'v2.6.32-rc5' into for-linus
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 55b5b90c2a44..1af808171d46 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <acpi/acpi_bus.h> | 36 | #include <acpi/acpi_bus.h> |
37 | #include <acpi/acpi_drivers.h> | 37 | #include <acpi/acpi_drivers.h> |
38 | 38 | ||
39 | #define PREFIX "ACPI: " | ||
40 | |||
39 | #define _COMPONENT ACPI_PCI_COMPONENT | 41 | #define _COMPONENT ACPI_PCI_COMPONENT |
40 | ACPI_MODULE_NAME("pci_root"); | 42 | ACPI_MODULE_NAME("pci_root"); |
41 | #define ACPI_PCI_ROOT_CLASS "pci_bridge" | 43 | #define ACPI_PCI_ROOT_CLASS "pci_bridge" |
@@ -61,20 +63,6 @@ static struct acpi_driver acpi_pci_root_driver = { | |||
61 | }, | 63 | }, |
62 | }; | 64 | }; |
63 | 65 | ||
64 | struct acpi_pci_root { | ||
65 | struct list_head node; | ||
66 | struct acpi_device *device; | ||
67 | struct pci_bus *bus; | ||
68 | u16 segment; | ||
69 | u8 bus_nr; | ||
70 | |||
71 | u32 osc_support_set; /* _OSC state of support bits */ | ||
72 | u32 osc_control_set; /* _OSC state of control bits */ | ||
73 | u32 osc_control_qry; /* the latest _OSC query result */ | ||
74 | |||
75 | u32 osc_queried:1; /* has _OSC control been queried? */ | ||
76 | }; | ||
77 | |||
78 | static LIST_HEAD(acpi_pci_roots); | 66 | static LIST_HEAD(acpi_pci_roots); |
79 | 67 | ||
80 | static struct acpi_pci_driver *sub_driver; | 68 | static struct acpi_pci_driver *sub_driver; |
@@ -317,7 +305,7 @@ static acpi_status acpi_pci_osc_support(struct acpi_pci_root *root, u32 flags) | |||
317 | return status; | 305 | return status; |
318 | } | 306 | } |
319 | 307 | ||
320 | static struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle) | 308 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle) |
321 | { | 309 | { |
322 | struct acpi_pci_root *root; | 310 | struct acpi_pci_root *root; |
323 | 311 | ||
@@ -327,6 +315,7 @@ static struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle) | |||
327 | } | 315 | } |
328 | return NULL; | 316 | return NULL; |
329 | } | 317 | } |
318 | EXPORT_SYMBOL_GPL(acpi_pci_find_root); | ||
330 | 319 | ||
331 | struct acpi_handle_node { | 320 | struct acpi_handle_node { |
332 | struct list_head node; | 321 | struct list_head node; |
@@ -400,6 +389,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle) | |||
400 | 389 | ||
401 | pbus = pdev->subordinate; | 390 | pbus = pdev->subordinate; |
402 | pci_dev_put(pdev); | 391 | pci_dev_put(pdev); |
392 | |||
393 | /* | ||
394 | * This function may be called for a non-PCI device that has a | ||
395 | * PCI parent (eg. a disk under a PCI SATA controller). In that | ||
396 | * case pdev->subordinate will be NULL for the parent. | ||
397 | */ | ||
398 | if (!pbus) { | ||
399 | dev_dbg(&pdev->dev, "Not a PCI-to-PCI bridge\n"); | ||
400 | pdev = NULL; | ||
401 | break; | ||
402 | } | ||
403 | } | 403 | } |
404 | out: | 404 | out: |
405 | list_for_each_entry_safe(node, tmp, &device_list, node) | 405 | list_for_each_entry_safe(node, tmp, &device_list, node) |