Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350832
b: refs/heads/master
c: e386309
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jan 3, 2013
1 parent 8c69ade commit 6bcfa86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: 636458de36f1fb4cdd318387d2f45604e451b17a
refs/heads/master: e3863094c6f9b2f980d6e7a5cad6b4d03a4dd579
18 changes: 8 additions & 10 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1551,8 +1551,8 @@ static int acpi_bus_type_and_status(acpi_handle handle, int *type,
return 0;
}

static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
void *context, void **return_value)
static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
void *not_used, void **return_value)
{
struct acpi_device *device = NULL;
int type;
Expand Down Expand Up @@ -1584,7 +1584,7 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
if (!device)
return AE_CTRL_DEPTH;

device->add_type = context ? ACPI_BUS_ADD_START : ACPI_BUS_ADD_MATCH;
device->add_type = ACPI_BUS_ADD_START;
acpi_hot_add_bind(device);

out:
Expand Down Expand Up @@ -1621,18 +1621,16 @@ static acpi_status acpi_bus_device_attach(acpi_handle handle, u32 lvl_not_used,
return status;
}

static int acpi_bus_scan(acpi_handle handle, bool start,
struct acpi_device **child)
static int acpi_bus_scan(acpi_handle handle, struct acpi_device **child)
{
void *device = NULL;
acpi_status status;
int ret = -ENODEV;

status = acpi_bus_check_add(handle, 0, (void *)start, &device);
status = acpi_bus_check_add(handle, 0, NULL, &device);
if (ACPI_SUCCESS(status))
acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX,
acpi_bus_check_add, NULL, (void *)start,
&device);
acpi_bus_check_add, NULL, NULL, &device);

if (!device)
goto out;
Expand Down Expand Up @@ -1676,7 +1674,7 @@ int acpi_bus_add(acpi_handle handle, struct acpi_device **ret)
{
int err;

err = acpi_bus_scan(handle, false, ret);
err = acpi_bus_scan(handle, ret);
if (err)
return err;

Expand Down Expand Up @@ -1782,7 +1780,7 @@ int __init acpi_scan_init(void)
/*
* Enumerate devices in the ACPI namespace.
*/
result = acpi_bus_scan(ACPI_ROOT_OBJECT, true, &acpi_root);
result = acpi_bus_scan(ACPI_ROOT_OBJECT, &acpi_root);

if (!result)
result = acpi_bus_scan_fixed();
Expand Down

0 comments on commit 6bcfa86

Please sign in to comment.