pinctrl: Drop post_bind() method when not needed
authorSimon Glass <sjg@chromium.org>
Wed, 23 Dec 2020 15:11:13 +0000 (08:11 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:40 +0000 (12:24 -0700)
This is not used with of-platdata, so remove it in that case.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/pinctrl/pinctrl-uclass.c

index aba881047479849b95f5866b04f723a69791f0c7..4e474cbff735270965f18d840e7592f729a8b4cd 100644 (file)
@@ -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",
 };