mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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>
This commit is contained in:
parent
2429613601
commit
44e02e39a9
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue