Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350970
b: refs/heads/master
c: 456de89
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jan 31, 2013
1 parent 5ffdbc0 commit 1199b84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 141a297bd02e8ddc5ab625cc3a1a5926b1ff929a
refs/heads/master: 456de893ea1a693dc266c5464a6d857bfed0875f
16 changes: 5 additions & 11 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,29 +871,23 @@ EXPORT_SYMBOL(acpi_bus_unregister_driver);
-------------------------------------------------------------------------- */
static struct acpi_device *acpi_bus_get_parent(acpi_handle handle)
{
struct acpi_device *device = NULL;
acpi_status status;
int ret;
struct acpi_device *device;

/*
* Fixed hardware devices do not appear in the namespace and do not
* have handles, but we fabricate acpi_devices for them, so we have
* to deal with them specially.
*/
if (handle == NULL)
if (!handle)
return acpi_root;

do {
status = acpi_get_parent(handle, &handle);
if (status == AE_NULL_ENTRY)
return NULL;
if (ACPI_FAILURE(status))
return acpi_root;

ret = acpi_bus_get_device(handle, &device);
if (ret == 0)
return device;
} while (1);
return status == AE_NULL_ENTRY ? NULL : acpi_root;
} while (acpi_bus_get_device(handle, &device));
return device;
}

acpi_status
Expand Down

0 comments on commit 1199b84

Please sign in to comment.