summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-23 08:11:13 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:40 -0700
commitc8fbf3089b2771d803b789c50f10c98e91d477a6 (patch)
treea2a609fe3010f65123a58b6c28e88c0b70d0b5f1
parentfb8c9fb3fa422314d53516ba30f280be1e7216f9 (diff)
downloadu-boot-c8fbf3089b2771d803b789c50f10c98e91d477a6.tar.gz
u-boot-c8fbf3089b2771d803b789c50f10c98e91d477a6.tar.xz
u-boot-c8fbf3089b2771d803b789c50f10c98e91d477a6.zip
pinctrl: Drop post_bind() method when not needed
This is not used with of-platdata, so remove it in that case. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--drivers/pinctrl/pinctrl-uclass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index aba8810474..4e474cbff7 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -305,7 +305,7 @@ int pinctrl_select_state(struct udevice *dev, const char *statename)
* Some device which is logical like mmc.blk, do not have
* a valid ofnode.
*/
- if (!ofnode_valid(dev->node))
+ if (!dev_has_of_node(dev))
return 0;
/*
* Try full-implemented pinctrl first.
@@ -416,7 +416,9 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
UCLASS_DRIVER(pinctrl) = {
.id = UCLASS_PINCTRL,
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
.post_bind = pinctrl_post_bind,
+#endif
.flags = DM_UC_FLAG_SEQ_ALIAS,
.name = "pinctrl",
};