Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336670
b: refs/heads/master
c: 594df89
h: refs/heads/master
v: v3
  • Loading branch information
Tang Chen authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent 65b712b commit 603854a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: 0a290ac4252c85205cb924ff7f6da10cfd20fb01
refs/heads/master: 594df89a59cf2a2afc22fe27f508dd864d1edb5f
17 changes: 14 additions & 3 deletions trunk/drivers/acpi/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ static int is_device_present(acpi_handle handle)
return ((sta & ACPI_STA_DEVICE_PRESENT) == ACPI_STA_DEVICE_PRESENT);
}

static bool is_container_device(const char *hid)
{
const struct acpi_device_id *container_id;

for (container_id = container_device_ids;
container_id->id[0]; container_id++) {
if (!strcmp((char *)container_id->id, hid))
return true;
}

return false;
}

/*******************************************************************/
static int acpi_container_add(struct acpi_device *device)
{
Expand Down Expand Up @@ -232,10 +245,8 @@ container_walk_namespace_cb(acpi_handle handle,
goto end;
}

if (strcmp(hid, "ACPI0004") && strcmp(hid, "PNP0A05") &&
strcmp(hid, "PNP0A06")) {
if (!is_container_device(hid))
goto end;
}

switch (*action) {
case INSTALL_NOTIFY_HANDLER:
Expand Down

0 comments on commit 603854a

Please sign in to comment.