From patchwork Fri May 13 08:19:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yisen Zhuang X-Patchwork-Id: 67738 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp137105qge; Fri, 13 May 2016 01:01:40 -0700 (PDT) X-Received: by 10.98.93.131 with SMTP id n3mr20800314pfj.141.1463126500683; Fri, 13 May 2016 01:01:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si23079662pfh.211.2016.05.13.01.01.40; Fri, 13 May 2016 01:01:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932101AbcEMIAq (ORCPT + 29 others); Fri, 13 May 2016 04:00:46 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:1503 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751947AbcEMIAl (ORCPT ); Fri, 13 May 2016 04:00:41 -0400 Received: from 172.24.1.36 (EHLO szxeml432-hub.china.huawei.com) ([172.24.1.36]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DKL58198; Fri, 13 May 2016 16:00:36 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.235.1; Fri, 13 May 2016 16:00:25 +0800 From: Yisen Zhuang To: , , CC: , , , , , , , , , , Subject: [patch net-next 06/11] ACPI: bus: move acpi_match_device_ids() to linux/acpi.h Date: Fri, 13 May 2016 16:19:12 +0800 Message-ID: <1463127557-90824-7-git-send-email-Yisen.Zhuang@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463127557-90824-1-git-send-email-Yisen.Zhuang@huawei.com> References: <1463127557-90824-1-git-send-email-Yisen.Zhuang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.573589A6.0021, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 79e116284523b35512e4c9650fd0580c Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hanjun Guo acpi_match_device_ids() will be used for drivers to match different hardware versions, it will be compiled in non-ACPI case, but acpi_match_device_ids() in acpi_bus.h and it can only be used in ACPI case, so move it to linux/acpi.h and introduce a stub function for it. Signed-off-by: Hanjun Guo Cc: Rafael J. Wysocki Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang --- include/acpi/acpi_bus.h | 2 -- include/linux/acpi.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 3a93250..12cf2cb 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -513,8 +513,6 @@ void acpi_bus_unregister_driver(struct acpi_driver *driver); int acpi_bus_scan(acpi_handle handle); void acpi_bus_trim(struct acpi_device *start); acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); -int acpi_match_device_ids(struct acpi_device *device, - const struct acpi_device_id *ids); int acpi_create_dir(struct acpi_device *); void acpi_remove_dir(struct acpi_device *); diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 06ed7e5..e578bce 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -933,7 +933,18 @@ int __acpi_probe_device_table(struct acpi_probe_entry *start, int nr); (&ACPI_PROBE_TABLE_END(t) - \ &ACPI_PROBE_TABLE(t))); \ }) + +int acpi_match_device_ids(struct acpi_device *device, + const struct acpi_device_id *ids); + #else + +static inline int acpi_match_device_ids(struct acpi_device *device, + const struct acpi_device_id *ids) +{ + return -ENOENT; +} + static inline int acpi_dev_get_property(struct acpi_device *adev, const char *name, acpi_object_type type, const union acpi_object **obj)