Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350828
b: refs/heads/master
c: 4002bf3
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jan 3, 2013
1 parent e0e0c4a commit f6d963c
Show file tree
Hide file tree
Showing 2 changed files with 11 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: a2d06a1a0851fb3d7e775b9d878cdffb9e0300ee
refs/heads/master: 4002bf384cc567a843a7d16c95db54a7d77b16c6
20 changes: 10 additions & 10 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,10 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
acpi_status status;
int result;

acpi_bus_get_device(handle, &device);
if (device)
goto out;

result = acpi_bus_type_and_status(handle, &type, &sta);
if (result)
return AE_OK;
Expand All @@ -1598,18 +1602,14 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
return AE_CTRL_DEPTH;
}

acpi_bus_get_device(handle, &device);
if (!device) {
acpi_add_single_object(&device, handle, type, sta,
ACPI_BUS_ADD_BASIC);
if (!device)
return AE_CTRL_DEPTH;
acpi_add_single_object(&device, handle, type, sta, ACPI_BUS_ADD_BASIC);
if (!device)
return AE_CTRL_DEPTH;

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

out:
if (!*return_value)
*return_value = device;

Expand Down

0 comments on commit f6d963c

Please sign in to comment.