Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271993
b: refs/heads/master
c: a540d6b
h: refs/heads/master
i:
  271991: 8461b79
v: v3
  • Loading branch information
Seth Forshee authored and Matthew Garrett committed Oct 24, 2011
1 parent 0582988 commit e574a03
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 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: 6e02cc7eb61aeafadb91f7b591a768cdb7a57740
refs/heads/master: a540d6b5b577f5a320d873a9cc8778ff20bf5ddf
28 changes: 22 additions & 6 deletions trunk/drivers/platform/x86/toshiba_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,11 +892,26 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
return 0;
}

static const char * __devinit find_hci_method(acpi_handle handle)
{
acpi_status status;
acpi_handle hci_handle;

status = acpi_get_handle(handle, "GHCI", &hci_handle);
if (ACPI_SUCCESS(status))
return "GHCI";

status = acpi_get_handle(handle, "SPFC", &hci_handle);
if (ACPI_SUCCESS(status))
return "SPFC";

return NULL;
}

static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
{
struct toshiba_acpi_dev *dev;
acpi_status status;
acpi_handle handle;
const char *hci_method;
u32 hci_result;
bool bt_present;
int ret = 0;
Expand All @@ -905,16 +920,17 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
pr_info("Toshiba Laptop ACPI Extras version %s\n",
TOSHIBA_ACPI_VERSION);

/* simple device detection: look for HCI method */
status = acpi_get_handle(acpi_dev->handle, "GHCI", &handle);
if (ACPI_FAILURE(status))
hci_method = find_hci_method(acpi_dev->handle);
if (!hci_method) {
pr_err("HCI interface not found\n");
return -ENODEV;
}

dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;
dev->acpi_dev = acpi_dev;
dev->method_hci = "GHCI";
dev->method_hci = hci_method;
acpi_dev->driver_data = dev;

if (toshiba_acpi_setup_keyboard(dev))
Expand Down

0 comments on commit e574a03

Please sign in to comment.