From: Kever Yang Date: Wed, 18 Apr 2018 09:54:04 +0000 (+0800) Subject: pinctrl: do not set_state for device without valid ofnode X-Git-Tag: v2018.07-rc1~135^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f717b4c8e7fc871573755a05be96c8ef857eabce;p=platform%2Fkernel%2Fu-boot.git pinctrl: do not set_state for device without valid ofnode Not all the udevice have a available DT node, eg. rksdmmc@ff500000.blk which add by mmc_bind(), these device do not have/need set pinctrl state. Signed-off-by: Kever Yang Reviewed-by: Simon Glass --- diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index d7e38ae..c38bb21 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -199,6 +199,12 @@ static int pinctrl_select_state_simple(struct udevice *dev) 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)) + return 0; + /* * Try full-implemented pinctrl first. * If it fails or is not implemented, try simple one. */