From patchwork Mon Apr 28 02:38:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 4074601 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CFF83BFF02 for ; Mon, 28 Apr 2014 02:37:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1FC2201FB for ; Mon, 28 Apr 2014 02:37:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E6632013A for ; Mon, 28 Apr 2014 02:37:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbaD1ChO (ORCPT ); Sun, 27 Apr 2014 22:37:14 -0400 Received: from mga09.intel.com ([134.134.136.24]:56639 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752290AbaD1ChO (ORCPT ); Sun, 27 Apr 2014 22:37:14 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 27 Apr 2014 19:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,940,1389772800"; d="scan'208";a="530666584" Received: from aaronlu.sh.intel.com ([10.239.37.56]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2014 19:37:12 -0700 Message-ID: <535DBF0C.7080409@intel.com> Date: Mon, 28 Apr 2014 10:38:04 +0800 From: Aaron Lu MIME-Version: 1.0 To: "Rafael J. Wysocki" CC: Len Brown , ACPI Devel Mailing List Subject: [PATCH] ACPI / scan: do not scan fixed hardware on HW-reduced platform Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixed hardware does not exist on HW-reduced ACPI platform since the programming interface for them is not implemented on those platforms, so no need to scan them. This patch avoids creating the fixed power button ACPI device and eliminates a probe error message from ACPI button driver on ASUS T100. Signed-off-by: Aaron Lu --- drivers/acpi/scan.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 7efe546a8c42..db5fc6f9628e 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -2259,12 +2259,16 @@ int __init acpi_scan_init(void) if (result) goto out; - result = acpi_bus_scan_fixed(); - if (result) { - acpi_detach_data(acpi_root->handle, acpi_scan_drop_device); - acpi_device_del(acpi_root); - put_device(&acpi_root->dev); - goto out; + /* Fixed feature devices do not exist on HW-reduced platform */ + if (!acpi_gbl_reduced_hardware) { + result = acpi_bus_scan_fixed(); + if (result) { + acpi_detach_data(acpi_root->handle, + acpi_scan_drop_device); + acpi_device_del(acpi_root); + put_device(&acpi_root->dev); + goto out; + } } acpi_update_all_gpes();