diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-04 00:32:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-04 00:32:50 -0400 |
commit | e82ca04387dd6c98722f5f48235089839fd04268 (patch) | |
tree | 8fb4b0435e57c7dab70dfd4cc71b4cd35686126d /drivers/acpi/pci_link.c | |
parent | 075395d228641646159dae3dd170fa3fc6ff477a (diff) | |
parent | 309b0f125a22ee34c8f6962677255f7bf6af5e3d (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (44 commits)
ACPI: remove function tracing macros from drivers/acpi/*.c
ACPI: add support for Smart Battery
ACPI: handle battery notify event on broken BIOS
ACPI: handle AC notify event on broken BIOS
ACPI: asus_acpi: add S1N WLED control
ACPI: asus_acpi: correct M6N/M6R display nodes
ACPI: asus_acpi: add S1N WLED control
ACPI: asus_acpi: rework model detection
ACPI: asus_acpi: support L5D
ACPI: asus_acpi: handle internal Bluetooth / support W5A
ACPI: asus_acpi: support A4G
ACPI: asus_acpi: support W3400N
ACPI: asus_acpi: LED display support
ACPI: asus_acpi: support A3G
ACPI: asus_acpi: misc cleanups
ACPI: video: Remove unneeded acpi_handle from driver.
ACPI: thermal: Remove unneeded acpi_handle from driver.
ACPI: power: Remove unneeded acpi_handle from driver.
ACPI: pci_root: Remove unneeded acpi_handle from driver.
ACPI: pci_link: Remove unneeded acpi_handle from driver.
...
Diffstat (limited to 'drivers/acpi/pci_link.c')
-rw-r--r-- | drivers/acpi/pci_link.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 1badce27a83f..8197c0e40769 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -83,7 +83,6 @@ struct acpi_pci_link_irq { | |||
83 | struct acpi_pci_link { | 83 | struct acpi_pci_link { |
84 | struct list_head node; | 84 | struct list_head node; |
85 | struct acpi_device *device; | 85 | struct acpi_device *device; |
86 | acpi_handle handle; | ||
87 | struct acpi_pci_link_irq irq; | 86 | struct acpi_pci_link_irq irq; |
88 | int refcnt; | 87 | int refcnt; |
89 | }; | 88 | }; |
@@ -175,7 +174,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link) | |||
175 | if (!link) | 174 | if (!link) |
176 | return -EINVAL; | 175 | return -EINVAL; |
177 | 176 | ||
178 | status = acpi_walk_resources(link->handle, METHOD_NAME__PRS, | 177 | status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS, |
179 | acpi_pci_link_check_possible, link); | 178 | acpi_pci_link_check_possible, link); |
180 | if (ACPI_FAILURE(status)) { | 179 | if (ACPI_FAILURE(status)) { |
181 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS")); | 180 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS")); |
@@ -249,8 +248,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) | |||
249 | acpi_status status = AE_OK; | 248 | acpi_status status = AE_OK; |
250 | int irq = 0; | 249 | int irq = 0; |
251 | 250 | ||
252 | 251 | if (!link) | |
253 | if (!link || !link->handle) | ||
254 | return -EINVAL; | 252 | return -EINVAL; |
255 | 253 | ||
256 | link->irq.active = 0; | 254 | link->irq.active = 0; |
@@ -274,7 +272,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) | |||
274 | * Query and parse _CRS to get the current IRQ assignment. | 272 | * Query and parse _CRS to get the current IRQ assignment. |
275 | */ | 273 | */ |
276 | 274 | ||
277 | status = acpi_walk_resources(link->handle, METHOD_NAME__CRS, | 275 | status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS, |
278 | acpi_pci_link_check_current, &irq); | 276 | acpi_pci_link_check_current, &irq); |
279 | if (ACPI_FAILURE(status)) { | 277 | if (ACPI_FAILURE(status)) { |
280 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS")); | 278 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS")); |
@@ -360,7 +358,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) | |||
360 | resource->end.type = ACPI_RESOURCE_TYPE_END_TAG; | 358 | resource->end.type = ACPI_RESOURCE_TYPE_END_TAG; |
361 | 359 | ||
362 | /* Attempt to set the resource */ | 360 | /* Attempt to set the resource */ |
363 | status = acpi_set_current_resources(link->handle, &buffer); | 361 | status = acpi_set_current_resources(link->device->handle, &buffer); |
364 | 362 | ||
365 | /* check for total failure */ | 363 | /* check for total failure */ |
366 | if (ACPI_FAILURE(status)) { | 364 | if (ACPI_FAILURE(status)) { |
@@ -699,7 +697,7 @@ int acpi_pci_link_free_irq(acpi_handle handle) | |||
699 | acpi_device_bid(link->device))); | 697 | acpi_device_bid(link->device))); |
700 | 698 | ||
701 | if (link->refcnt == 0) { | 699 | if (link->refcnt == 0) { |
702 | acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); | 700 | acpi_ut_evaluate_object(link->device->handle, "_DIS", 0, NULL); |
703 | } | 701 | } |
704 | mutex_unlock(&acpi_link_lock); | 702 | mutex_unlock(&acpi_link_lock); |
705 | return (link->irq.active); | 703 | return (link->irq.active); |
@@ -726,7 +724,6 @@ static int acpi_pci_link_add(struct acpi_device *device) | |||
726 | memset(link, 0, sizeof(struct acpi_pci_link)); | 724 | memset(link, 0, sizeof(struct acpi_pci_link)); |
727 | 725 | ||
728 | link->device = device; | 726 | link->device = device; |
729 | link->handle = device->handle; | ||
730 | strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME); | 727 | strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME); |
731 | strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); | 728 | strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); |
732 | acpi_driver_data(device) = link; | 729 | acpi_driver_data(device) = link; |
@@ -765,7 +762,7 @@ static int acpi_pci_link_add(struct acpi_device *device) | |||
765 | 762 | ||
766 | end: | 763 | end: |
767 | /* disable all links -- to be activated on use */ | 764 | /* disable all links -- to be activated on use */ |
768 | acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); | 765 | acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL); |
769 | mutex_unlock(&acpi_link_lock); | 766 | mutex_unlock(&acpi_link_lock); |
770 | 767 | ||
771 | if (result) | 768 | if (result) |