Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166388
b: refs/heads/master
c: e3b87f8
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Sep 25, 2009
1 parent 5af43ee commit ae5e963
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: 778cbc1d3abd434b6d882714630235e3711bb15b
refs/heads/master: e3b87f8a9d5a61f6367c66d1bb0a4e19d251194d
19 changes: 11 additions & 8 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,10 +1400,10 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
void *context, void **return_value)
{
struct acpi_bus_ops *ops = context;
struct acpi_device *device = NULL;
acpi_status status;
int type;
unsigned long long sta;
struct acpi_device *device;
acpi_status status;
int result;

result = acpi_bus_type_and_status(handle, &type, &sta);
Expand All @@ -1414,13 +1414,16 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
!(sta & ACPI_STA_DEVICE_FUNCTIONING))
return AE_CTRL_DEPTH;

if (ops->acpi_op_add)
status = acpi_add_single_object(&device, handle, type, sta,
ops);
else
status = acpi_bus_get_device(handle, &device);
/*
* We may already have an acpi_device from a previous enumeration. If
* so, we needn't add it again, but we may still have to start it.
*/
device = NULL;
acpi_bus_get_device(handle, &device);
if (ops->acpi_op_add && !device)
acpi_add_single_object(&device, handle, type, sta, ops);

if (ACPI_FAILURE(status))
if (!device)
return AE_CTRL_DEPTH;

if (ops->acpi_op_start && !(ops->acpi_op_add)) {
Expand Down

0 comments on commit ae5e963

Please sign in to comment.