From patchwork Sat Oct 6 20:09:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1559941 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AE3A03FD56 for ; Sat, 6 Oct 2012 20:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176Ab2JFUVI (ORCPT ); Sat, 6 Oct 2012 16:21:08 -0400 Received: from mail-qa0-f46.google.com ([209.85.216.46]:59199 "EHLO mail-qa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932107Ab2JFUVH (ORCPT ); Sat, 6 Oct 2012 16:21:07 -0400 Received: by mail-qa0-f46.google.com with SMTP id c26so1240550qad.19 for ; Sat, 06 Oct 2012 13:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:reply-to:organization; bh=ocAqVjEGBnCNrFkUk5x0AzhLbGlKxQ2vTB/OJ1XiQ3I=; b=KL+v1J95eW0KByZOtGXdwUQ5XKBP3jN6+C80ajdqmuNIKhYktRa1B4JXA49iajOL5N PKSmc4KOa12j0HgVlsrRfAKWJNuQlPZ/6pDa/speoT0mVChZp0DOIe43dgfZeT1MUoY4 8QznCCTYJflniX4G1KeYnwUG0KRvsUY83zIixFv7p5U1JbTt+zgePSH2FbhJe2FjsTYE pq6W7dA5bnJe0HKDO+EnDhCr0ATrWLuy6PVlacD/1kY9u1sHOjPK+QgA7A09Bxy9lMc8 r9abl69QPqcWALdaqMSSIYl5oTtiLu1KOrAPp4LMR2+GTCzgo2d3aR4rtqCFQ6ODrRWv z3rw== Received: by 10.229.135.140 with SMTP id n12mr5199568qct.31.1349554866662; Sat, 06 Oct 2012 13:21:06 -0700 (PDT) Received: from x980.localdomain6 (pool-74-104-146-186.bstnma.fios.verizon.net. [74.104.146.186]) by mx.google.com with ESMTPS id x19sm13470740qeq.12.2012.10.06.13.20.37 (version=SSLv3 cipher=OTHER); Sat, 06 Oct 2012 13:20:52 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Lin Ming , Len Brown , stable@vger.kernel.org Subject: [PATCH 37/49] ACPI: run _OSC after ACPI_FULL_INITIALIZATION Date: Sat, 6 Oct 2012 16:09:58 -0400 Message-Id: X-Mailer: git-send-email 1.8.0.rc0.18.gf84667d In-Reply-To: <1349554210-29978-1-git-send-email-lenb@kernel.org> References: <1349554210-29978-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Lin Ming The _OSC method may exist in module level code, so it must be called after ACPI_FULL_INITIALIZATION On some new platforms with Zero-Power-Optical-Disk-Drive (ZPODD) support, this fix is necessary to save power. Signed-off-by: Lin Ming Tested-by: Aaron Lu Signed-off-by: Len Brown Cc: stable@vger.kernel.org --- drivers/acpi/bus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e059695..d59175e 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -994,8 +994,6 @@ static int __init acpi_bus_init(void) status = acpi_ec_ecdt_probe(); /* Ignore result. Not having an ECDT is not fatal. */ - acpi_bus_osc_support(); - status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n"); @@ -1003,6 +1001,12 @@ static int __init acpi_bus_init(void) } /* + * _OSC method may exist in module level code, + * so it must be run after ACPI_FULL_INITIALIZATION + */ + acpi_bus_osc_support(); + + /* * _PDC control method may load dynamic SSDT tables, * and we need to install the table handler before that. */