From: Yisen Zhuang <Yisen.Zhuang@huawei.com>
To: <davem@davemloft.net>, <rjw@rjwysocki.net>, <lenb@kernel.org>
Cc: <arnd@arndb.de>, <andriy.shevchenko@linux.intel.com>,
<andrew@lunn.ch>, <geliangtang@163.com>, <ivecera@redhat.com>,
<fengguang.wu@intel.com>, <charles.chenxin@huawei.com>,
<haifeng.wei@huawei.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>
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 [thread overview]
Message-ID: <1463127557-90824-7-git-send-email-Yisen.Zhuang@huawei.com> (raw)
In-Reply-To: <1463127557-90824-1-git-send-email-Yisen.Zhuang@huawei.com>
From: Hanjun Guo <hanjun.guo@linaro.org>
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 <hanjun.guo@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Kejian Yan <yankejian@huawei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
---
include/acpi/acpi_bus.h | 2 --
include/linux/acpi.h | 11 +++++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
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)
--
1.9.1
next prev parent reply other threads:[~2016-05-13 8:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 8:19 [patch net-next 00/11] net: hns: add support of ACPI Yisen Zhuang
2016-05-13 8:19 ` [patch net-next 01/11] net: hisilicon: add support of acpi for hns-mdio Yisen Zhuang
2016-05-13 12:59 ` Andy Shevchenko
2016-05-16 7:10 ` Yankejian (Hackim Yim)
2016-05-13 8:19 ` [patch net-next 02/11] net: hns: use device_* APIs instead of of_* APIs Yisen Zhuang
2016-05-13 8:19 ` [patch net-next 03/11] net: hns: use platform_get_irq instead of irq_of_parse_and_map Yisen Zhuang
2016-05-13 8:19 ` [patch net-next 04/11] net: hns: enet specify a reference to dsaf by fwnode_handle Yisen Zhuang
2016-05-13 13:01 ` Andy Shevchenko
2016-05-13 8:19 ` [patch net-next 05/11] net: hns: add uniform interface for phy connection Yisen Zhuang
2016-05-13 13:07 ` Andy Shevchenko
2016-05-16 0:40 ` Yankejian (Hackim Yim)
2016-05-13 8:19 ` Yisen Zhuang [this message]
2016-05-13 13:15 ` [patch net-next 06/11] ACPI: bus: move acpi_match_device_ids() to linux/acpi.h Andy Shevchenko
2016-05-16 1:57 ` Yankejian (Hackim Yim)
2016-05-13 8:19 ` [patch net-next 07/11] net: hns: dsaf adds support of acpi Yisen Zhuang
2016-05-13 13:12 ` Andy Shevchenko
2016-05-16 2:06 ` Yankejian (Hackim Yim)
2016-05-13 8:19 ` [patch net-next 08/11] net: hns: register phy device in each mac initial sequence Yisen Zhuang
2016-05-13 8:29 ` kbuild test robot
2016-05-13 8:19 ` [patch net-next 09/11] ACPI: bus: add stub acpi_evaluate_dsm() to linux/acpi.h Yisen Zhuang
2016-05-13 8:19 ` [patch net-next 10/11] net: hns: implement the reset sequence by asl Yisen Zhuang
2016-05-13 8:19 ` [patch net-next 11/11] net: hns: enet adds support of acpi Yisen Zhuang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463127557-90824-7-git-send-email-Yisen.Zhuang@huawei.com \
--to=yisen.zhuang@huawei.com \
--cc=andrew@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=charles.chenxin@huawei.com \
--cc=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=geliangtang@163.com \
--cc=haifeng.wei@huawei.com \
--cc=ivecera@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).