From: Arnd Bergmann <arnd@kernel.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Frank Rowand <frowand.list@gmail.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] of: move dummy of_device_get_match_data() helper
Date: Thu, 13 Apr 2023 18:33:30 +0200 [thread overview]
Message-ID: <20230413163353.3408208-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
The previous patch only moved the regular declaration but missed
the inline function that is used with CONFIG_OF=n:
drivers/tty/serial/samsung_tty.c:2034:10: error: implicit declaration of function 'of_device_get_match_data' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
Fixes: f5a2dc751657 ("of: Move of_device_get_match_data() declaration")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/of.h | 5 +++++
include/linux/of_device.h | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index f94f9e6476c0..c0d1512f979a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -815,6 +815,11 @@ static inline bool of_console_check(const struct device_node *dn, const char *na
return false;
}
+static inline const void *of_device_get_match_data(const struct device *dev)
+{
+ return NULL;
+}
+
static inline const __be32 *of_prop_next_u32(struct property *prop,
const __be32 *cur, u32 *pu)
{
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 455c51a09091..2c7a3d4bc775 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -51,11 +51,6 @@ static inline int of_driver_match_device(struct device *dev,
static inline void of_device_uevent(const struct device *dev,
struct kobj_uevent_env *env) { }
-static inline const void *of_device_get_match_data(const struct device *dev)
-{
- return NULL;
-}
-
static inline int of_device_modalias(struct device *dev,
char *str, ssize_t len)
{
--
2.39.2
next reply other threads:[~2023-04-13 16:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 16:33 Arnd Bergmann [this message]
2023-04-18 13:20 ` [PATCH] of: move dummy of_device_get_match_data() helper Rob Herring
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=20230413163353.3408208-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.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