Skip to content

Commit eb9eb4d

Browse files
Bartosz Golaszewskilinusw
authored andcommitted
driver core: make pinctrl_bind_pins() private
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> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Linus Walleij <linusw@kernel.org>
1 parent 43519f5 commit eb9eb4d

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

drivers/base/base.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,12 @@ static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
289289

290290
void software_node_notify(struct device *dev);
291291
void software_node_notify_remove(struct device *dev);
292+
293+
#ifdef CONFIG_PINCTRL
294+
int pinctrl_bind_pins(struct device *dev);
295+
#else
296+
static inline int pinctrl_bind_pins(struct device *dev)
297+
{
298+
return 0;
299+
}
300+
#endif /* CONFIG_PINCTRL */

drivers/base/pinctrl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <linux/pinctrl/consumer.h>
1515
#include <linux/slab.h>
1616

17+
#include "base.h"
18+
1719
/**
1820
* pinctrl_bind_pins() - called by the device core before probe
1921
* @dev: the device that is just about to probe

include/linux/pinctrl/devinfo.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ struct dev_pin_info {
4343
#endif
4444
};
4545

46-
extern int pinctrl_bind_pins(struct device *dev);
4746
extern int pinctrl_init_done(struct device *dev);
4847

4948
static inline struct pinctrl *dev_pinctrl(struct device *dev)
@@ -58,11 +57,6 @@ static inline struct pinctrl *dev_pinctrl(struct device *dev)
5857

5958
/* Stubs if we're not using pinctrl */
6059

61-
static inline int pinctrl_bind_pins(struct device *dev)
62-
{
63-
return 0;
64-
}
65-
6660
static inline int pinctrl_init_done(struct device *dev)
6761
{
6862
return 0;

0 commit comments

Comments
 (0)