summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-09-17 09:29:22 +0000
committerSimon Glass <sjg@chromium.org>2019-10-15 08:40:02 -0600
commitf0cc4eae9a1702a768817ea25d9f23cece69d021 (patch)
treed7047d5ce50b161b4a005e079cd78a69cf45609f /drivers
parent9c1e982218b2eaa4afed835fe12ef91d14c9659c (diff)
core: device: use dev_power_domain_on
When multiple power domains attached to a device, need power on them all, so use dev_power_domain_on to do that. Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 24b940eac2..28363ff00b 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -312,7 +312,6 @@ static void *alloc_priv(int size, uint flags)
int device_probe(struct udevice *dev)
{
- struct power_domain pd;
const struct driver *drv;
int size = 0;
int ret;
@@ -395,8 +394,9 @@ int device_probe(struct udevice *dev)
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);
+ ret = dev_power_domain_on(dev);
+ if (ret)
+ goto fail;
}
ret = uclass_pre_probe_device(dev);