From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Linus Walleij <linusw@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH] driver core: make pinctrl_bind_pins() private
Date: Thu, 8 Jan 2026 13:52:37 +0100 [thread overview]
Message-ID: <20260108125237.28092-1-bartosz.golaszewski@oss.qualcomm.com> (raw)
pinctrl_bind_pins() is only used by driver core (as it should). Move it
out of the public header into base.h.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
drivers/base/base.h | 9 +++++++++
drivers/base/pinctrl.c | 2 ++
include/linux/pinctrl/devinfo.h | 6 ------
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 430cbefbc97f..aafc0adbe77d 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -289,3 +289,12 @@ static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
void software_node_notify(struct device *dev);
void software_node_notify_remove(struct device *dev);
+
+#ifdef CONFIG_PINCTRL
+int pinctrl_bind_pins(struct device *dev);
+#else
+static inline int pinctrl_bind_pins(struct device *dev)
+{
+ return 0;
+}
+#endif /* CONFIG_PINCTRL */
diff --git a/drivers/base/pinctrl.c b/drivers/base/pinctrl.c
index c22864458511..6e250272c843 100644
--- a/drivers/base/pinctrl.c
+++ b/drivers/base/pinctrl.c
@@ -14,6 +14,8 @@
#include <linux/pinctrl/consumer.h>
#include <linux/slab.h>
+#include "base.h"
+
/**
* pinctrl_bind_pins() - called by the device core before probe
* @dev: the device that is just about to probe
diff --git a/include/linux/pinctrl/devinfo.h b/include/linux/pinctrl/devinfo.h
index bb6653af4f92..de4228eea90a 100644
--- a/include/linux/pinctrl/devinfo.h
+++ b/include/linux/pinctrl/devinfo.h
@@ -43,7 +43,6 @@ struct dev_pin_info {
#endif
};
-extern int pinctrl_bind_pins(struct device *dev);
extern int pinctrl_init_done(struct device *dev);
static inline struct pinctrl *dev_pinctrl(struct device *dev)
@@ -58,11 +57,6 @@ static inline struct pinctrl *dev_pinctrl(struct device *dev)
/* Stubs if we're not using pinctrl */
-static inline int pinctrl_bind_pins(struct device *dev)
-{
- return 0;
-}
-
static inline int pinctrl_init_done(struct device *dev)
{
return 0;
--
2.47.3
next reply other threads:[~2026-01-08 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 12:52 Bartosz Golaszewski [this message]
2026-01-09 13:26 ` [PATCH] driver core: make pinctrl_bind_pins() private Linus Walleij
2026-01-09 16:26 ` Danilo Krummrich
2026-01-09 23:23 ` Linus Walleij
2026-01-16 14:31 ` Greg Kroah-Hartman
2026-01-18 23:35 ` Linus Walleij
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=20260108125237.28092-1-bartosz.golaszewski@oss.qualcomm.com \
--to=bartosz.golaszewski@oss.qualcomm.com \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@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