summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Garrett <mjg59@srcf.ucam.org>2008-10-29 14:01:03 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-20 14:54:48 -0800
commit08ed5844d41cdd0b8576de8b4b7036b0adbf1688 (patch)
tree2c77b838f21601b5ccbe8edbbc865c2bfe35ef85
parent8cbad29c963e46d5806040ae5abead32e604e5a5 (diff)
sony-laptop: ignore missing _DIS method on pic device
commit 6158d3a2323835546c7cf83a170316fa77b726e0 upstream. At least the Vaio VGN-Z540N doesn't have this method, so let's not fail to suspend just because it doesn't exist. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Mattia Dongili <malattia@linux.it> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Steve Conklin <sconklin@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/misc/sony-laptop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 60775be22822..b35eb9217ad0 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -2315,8 +2315,10 @@ end:
*/
static int sony_pic_disable(struct acpi_device *device)
{
- if (ACPI_FAILURE(acpi_evaluate_object(device->handle,
- "_DIS", NULL, NULL)))
+ acpi_status ret = acpi_evaluate_object(device->handle, "_DIS", NULL,
+ NULL);
+
+ if (ACPI_FAILURE(ret) && ret != AE_NOT_FOUND)
return -ENXIO;
dprintk("Device disabled\n");