From: Liu Shixin <liushixin2@huawei.com>
To: Khalil Blaiech <kblaiech@mellanox.com>,
Wolfram Sang <wsa@kernel.org>,
Vadim Pasternak <vadimp@mellanox.com>
Cc: <linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Liu Shixin <liushixin2@huawei.com>
Subject: [PATCH] i2c: mlxbf: Fix build error with CONFIG_ACPI disabled
Date: Mon, 2 Nov 2020 20:12:34 +0800 [thread overview]
Message-ID: <20201102121234.1343672-1-liushixin2@huawei.com> (raw)
drivers/i2c/busses/i2c-mlxbf.c: In function ‘mlxbf_i2c_acpi_probe’:
drivers/i2c/busses/i2c-mlxbf.c:2296:8: error: implicit declaration of function ‘acpi_device_uid’; did you mean ‘cpu_device_up’? [-Werror=implicit-function-declaration]
uid = acpi_device_uid(adev);
^~~~~~~~~~~~~~~
cpu_device_up
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
drivers/i2c/busses/i2c-mlxbf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index ee59e0da082d..cd8a909431a9 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2272,6 +2272,7 @@ static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
MODULE_DEVICE_TABLE(acpi, mlxbf_i2c_acpi_ids);
+#ifdef CONFIG_ACPI
static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
{
const struct acpi_device_id *aid;
@@ -2305,6 +2306,12 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
return ret;
}
+#else
+static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
+{
+ return -ENODEV;
+}
+#endif
static int mlxbf_i2c_of_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
{
--
2.25.1
next reply other threads:[~2020-11-02 11:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 12:12 Liu Shixin [this message]
2020-11-02 16:57 ` kernel test robot
2020-11-03 22:22 ` Khalil Blaiech
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=20201102121234.1343672-1-liushixin2@huawei.com \
--to=liushixin2@huawei.com \
--cc=kblaiech@mellanox.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vadimp@mellanox.com \
--cc=wsa@kernel.org \
/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
all inboxes | Powered by JetHome®