]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
sony-laptop: ignore missing _DIS method on pic device
authorMatthew Garrett <mjg59@srcf.ucam.org>
Wed, 29 Oct 2008 21:01:03 +0000 (14:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Oct 2008 18:38:46 +0000 (11:38 -0700)
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>
drivers/misc/sony-laptop.c

index 5a97d3a9d745ee3ab5d17e5e1b86bce5a9fae132..f483c4221f7602cb80022699e98008c5e2d33d79 100644 (file)
@@ -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");