Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62537
b: refs/heads/master
c: b25b732
h: refs/heads/master
i:
  62535: 4917914
v: v3
  • Loading branch information
Mattia Dongili authored and Len Brown committed Jul 22, 2007
1 parent f2175c7 commit 2374ed1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 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: 6315fd1c9cd6870a253699f07c5ada85cfe8fecb
refs/heads/master: b25b732a16e4e035247fa729f931ed173f9fc8e2
20 changes: 19 additions & 1 deletion trunk/drivers/misc/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,15 @@ static int sony_nc_add(struct acpi_device *device)

sony_nc_acpi_handle = device->handle;

/* read device status */
result = acpi_bus_get_status(device);
/* bail IFF the above call was successful and the device is not present */
if (!result && !device->status.present) {
dprintk("Device not present\n");
result = -ENODEV;
goto outwalk;
}

if (debug) {
status = acpi_walk_namespace(ACPI_TYPE_METHOD, sony_nc_acpi_handle,
1, sony_walk_callback, NULL, NULL);
Expand All @@ -874,6 +883,15 @@ static int sony_nc_add(struct acpi_device *device)
}
}

/* try to _INI the device if such method exists (ACPI spec 3.0-6.5.1
* should be respected as we already checked for the device presence above */
if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, METHOD_NAME__INI, &handle))) {
dprintk("Invoking _INI\n");
if (ACPI_FAILURE(acpi_evaluate_object(sony_nc_acpi_handle, METHOD_NAME__INI,
NULL, NULL)))
dprintk("_INI Method failed\n");
}

/* setup input devices and helper fifo */
result = sony_laptop_setup_input();
if (result) {
Expand All @@ -886,7 +904,7 @@ static int sony_nc_add(struct acpi_device *device)
ACPI_DEVICE_NOTIFY,
sony_acpi_notify, NULL);
if (ACPI_FAILURE(status)) {
printk(KERN_WARNING DRV_PFX "unable to install notify handler\n");
printk(KERN_WARNING DRV_PFX "unable to install notify handler (%u)\n", status);
result = -ENODEV;
goto outinput;
}
Expand Down

0 comments on commit 2374ed1

Please sign in to comment.