drivers/base/base.h | 9 +++++++++ drivers/base/pinctrl.c | 2 ++ include/linux/pinctrl/devinfo.h | 6 ------ 3 files changed, 11 insertions(+), 6 deletions(-)
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
On Thu, Jan 8, 2026 at 1:52 PM Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> wrote: > 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> Patch applied! Yours, Linus Walleij
On Thu, Jan 08, 2026 at 01:52:37PM +0100, Bartosz Golaszewski wrote: > 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(-) Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On Thu Jan 8, 2026 at 1:52 PM CET, Bartosz Golaszewski wrote: > 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> Acked-by: Danilo Krummrich <dakr@kernel.org> Should this go through the driver-core or pinctrl tree?
On Fri, Jan 9, 2026 at 5:26 PM Danilo Krummrich <dakr@kernel.org> wrote: > On Thu Jan 8, 2026 at 1:52 PM CET, Bartosz Golaszewski wrote: > > 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> > > Acked-by: Danilo Krummrich <dakr@kernel.org> > > Should this go through the driver-core or pinctrl tree? pinctrl, but I wanna give Greg a few days to react first. Yours, Linus Walleij
On Thu, Jan 8, 2026 at 1:52 PM Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> wrote: > 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> Oh good point. I guess technically base.h is Greg's file so I'll wait and see if he has something to say before applying it. Yours, Linus Walleij
© 2016 - 2026 Red Hat, Inc.