From: Simon Glass Date: Thu, 17 Dec 2020 13:57:15 -0700 Subject: [PATCH 01/20] pinctrl: Drop post_bind() method when not needed In-Reply-To: <20201217205734.631098-1-sjg@chromium.org> References: <20201217205734.631098-1-sjg@chromium.org> Message-ID: <20201217205734.631098-2-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is not used with of-platdata, so remove it in that case. Signed-off-by: Simon Glass --- drivers/pinctrl/pinctrl-uclass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index aba88104747..4e474cbff73 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", }; -- 2.29.2.684.gfbc64c5ab5-goog