From 67a7136573b24a0d1f85a4aab131558a02910d25 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Fri, 19 May 2006 16:54:42 -0400 Subject: ACPI: pci_link: Use acpi_device's handle instead of driver's Signed-off-by: Patrick Mochel Signed-off-by: Len Brown --- drivers/acpi/pci_link.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/acpi/pci_link.c') diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 1badce27a83f..68ee80a6e6f7 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -175,7 +175,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link) if (!link) return -EINVAL; - status = acpi_walk_resources(link->handle, METHOD_NAME__PRS, + status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS, acpi_pci_link_check_possible, link); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS")); @@ -274,7 +274,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) * Query and parse _CRS to get the current IRQ assignment. */ - status = acpi_walk_resources(link->handle, METHOD_NAME__CRS, + status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS, acpi_pci_link_check_current, &irq); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS")); @@ -360,7 +360,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) resource->end.type = ACPI_RESOURCE_TYPE_END_TAG; /* Attempt to set the resource */ - status = acpi_set_current_resources(link->handle, &buffer); + status = acpi_set_current_resources(link->device->handle, &buffer); /* check for total failure */ if (ACPI_FAILURE(status)) { @@ -699,7 +699,7 @@ int acpi_pci_link_free_irq(acpi_handle handle) acpi_device_bid(link->device))); if (link->refcnt == 0) { - acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); + acpi_ut_evaluate_object(link->device->handle, "_DIS", 0, NULL); } mutex_unlock(&acpi_link_lock); return (link->irq.active); @@ -765,7 +765,7 @@ static int acpi_pci_link_add(struct acpi_device *device) end: /* disable all links -- to be activated on use */ - acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); + acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL); mutex_unlock(&acpi_link_lock); if (result) -- cgit v1.2.2 From e0e4e117d4c898b0df749d5b88c86955151abf53 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Fri, 19 May 2006 16:54:50 -0400 Subject: ACPI: pci_link: Remove unneeded acpi_handle from driver. Signed-off-by: Patrick Mochel Signed-off-by: Len Brown --- drivers/acpi/pci_link.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/acpi/pci_link.c') diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 68ee80a6e6f7..8197c0e40769 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -83,7 +83,6 @@ struct acpi_pci_link_irq { struct acpi_pci_link { struct list_head node; struct acpi_device *device; - acpi_handle handle; struct acpi_pci_link_irq irq; int refcnt; }; @@ -249,8 +248,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) acpi_status status = AE_OK; int irq = 0; - - if (!link || !link->handle) + if (!link) return -EINVAL; link->irq.active = 0; @@ -726,7 +724,6 @@ static int acpi_pci_link_add(struct acpi_device *device) memset(link, 0, sizeof(struct acpi_pci_link)); link->device = device; - link->handle = device->handle; strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); acpi_driver_data(device) = link; -- cgit v1.2.2