diff options
author | Anatolij Gustschin <agust@denx.de> | 2019-07-14 22:11:01 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-24 22:54:08 +0300 |
commit | 44e02e39a91cd91aae5a28d90259d3a6996010bf (patch) | |
tree | cef69e3a2c0f6482602fc1cc589a808ed68e5145 /drivers/core | |
parent | 2429613601c8cba82f05f4d58f8c9ba057849932 (diff) | |
download | u-boot-44e02e39a91cd91aae5a28d90259d3a6996010bf.tar.xz |
dm: device: make power domain calls optional
Reduce power domain calls when CONFIG_POWER_DOMAIN is disabled.
With gcc v8.2, this change saves 104 bytes.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 37d89bcd1d..474c1642ee 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -388,7 +388,8 @@ int device_probe(struct udevice *dev) if (dev->parent && device_get_uclass_id(dev) != UCLASS_PINCTRL) pinctrl_select_state(dev, "default"); - if (dev->parent && device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) { + if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent && + device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) { if (!power_domain_get(dev, &pd)) power_domain_on(&pd); } |