From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Jackson Subject: [PATCH] sony-laptop: Ignore missing _DIS method on pic device Date: Thu, 16 Oct 2008 17:29:10 -0400 Message-ID: <1224192550-366-1-git-send-email-ajax@redhat.com> Return-path: Received: from mx1.redhat.com ([66.187.233.31]:36901 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbYJPV3R (ORCPT ); Thu, 16 Oct 2008 17:29:17 -0400 Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: linux-acpi@vger.kernel.org, Matthew Garrett , Adam Jackson From: Matthew Garrett 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 --- drivers/misc/sony-laptop.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 60775be..b35eb92 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"); -- 1.6.0.1