Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166382
b: refs/heads/master
c: 8e029bf
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Sep 25, 2009
1 parent a583597 commit 84f9554
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 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: 5c478f499c9e6a3ac542c940f7b434686f4967a5
refs/heads/master: 8e029bf0a611ea3995bd1fae0285cbaf6eed7f16
34 changes: 17 additions & 17 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ static int acpi_add_single_object(struct acpi_device **child,
return result;
}

static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops)
static int acpi_bus_scan(acpi_handle handle, struct acpi_bus_ops *ops)
{
acpi_status status = AE_OK;
struct acpi_device *parent = NULL;
Expand All @@ -1396,13 +1396,16 @@ static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops)
acpi_handle chandle = NULL;
acpi_object_type type = 0;
u32 level = 1;
int ret;


if (!start)
return -EINVAL;

parent = start;
phandle = start->handle;
/*
* We must have an acpi_device for the starting node already, and
* we scan its children.
*/
phandle = handle;
ret = acpi_bus_get_device(phandle, &parent);
if (ret)
return ret;

/*
* Parse through the ACPI namespace, identify all 'devices', and
Expand Down Expand Up @@ -1516,7 +1519,7 @@ acpi_bus_add(struct acpi_device **child,

result = acpi_add_single_object(child, handle, type, &ops);
if (!result)
result = acpi_bus_scan(*child, &ops);
result = acpi_bus_scan((*child)->handle, &ops);

return result;
}
Expand All @@ -1527,16 +1530,13 @@ int acpi_bus_start(struct acpi_device *device)
int result;
struct acpi_bus_ops ops;


if (!device)
return -EINVAL;
memset(&ops, 0, sizeof(ops));
ops.acpi_op_start = 1;

result = acpi_start_single_object(device);
if (!result) {
memset(&ops, 0, sizeof(ops));
ops.acpi_op_start = 1;
result = acpi_bus_scan(device, &ops);
}
if (!result)
result = acpi_bus_scan(device->handle, &ops);

return result;
}
EXPORT_SYMBOL(acpi_bus_start);
Expand Down Expand Up @@ -1653,7 +1653,7 @@ int __init acpi_scan_init(void)
result = acpi_bus_scan_fixed();

if (!result)
result = acpi_bus_scan(acpi_root, &ops);
result = acpi_bus_scan(acpi_root->handle, &ops);

if (result)
acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL);
Expand Down

0 comments on commit 84f9554

Please sign in to comment.