diff options
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/domain/power-domain-uclass.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/act8846.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/i2c_pmic_emul.c | 6 | ||||
-rw-r--r-- | drivers/power/pmic/lp873x.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/max77686.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/palmas.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/pfuze100.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/pmic-uclass.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/rk808.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/s5m8767.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/sandbox.c | 2 | ||||
-rw-r--r-- | drivers/power/pmic/tps65090.c | 2 | ||||
-rw-r--r-- | drivers/power/regulator/fixed.c | 4 | ||||
-rw-r--r-- | drivers/power/regulator/gpio-regulator.c | 2 | ||||
-rw-r--r-- | drivers/power/regulator/pwm_regulator.c | 2 | ||||
-rw-r--r-- | drivers/power/regulator/regulator-uclass.c | 4 |
16 files changed, 20 insertions, 20 deletions
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c index 1bb6262fa1..3dabbe4ac0 100644 --- a/drivers/power/domain/power-domain-uclass.c +++ b/drivers/power/domain/power-domain-uclass.c @@ -41,7 +41,7 @@ int power_domain_get(struct udevice *dev, struct power_domain *power_domain) debug("%s(dev=%p, power_domain=%p)\n", __func__, dev, power_domain); - ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev->of_offset, + ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev_of_offset(dev), "power-domains", "#power-domain-cells", 0, 0, &args); diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c index e8164bfd08..15da12edea 100644 --- a/drivers/power/pmic/act8846.c +++ b/drivers/power/pmic/act8846.c @@ -52,7 +52,7 @@ static int act8846_bind(struct udevice *dev) int regulators_node; int children; - regulators_node = fdt_subnode_offset(blob, dev->of_offset, + regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev), "regulators"); if (regulators_node <= 0) { debug("%s: %s regulators subnode not found!", __func__, diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c index aeab5c949a..4f92e3dad8 100644 --- a/drivers/power/pmic/i2c_pmic_emul.c +++ b/drivers/power/pmic/i2c_pmic_emul.c @@ -108,9 +108,9 @@ static int sandbox_i2c_pmic_ofdata_to_platdata(struct udevice *emul) debug("%s:%d Setting PMIC default registers\n", __func__, __LINE__); - reg_defaults = fdtdec_locate_byte_array(gd->fdt_blob, emul->of_offset, - "reg-defaults", - SANDBOX_PMIC_REG_COUNT); + reg_defaults = fdtdec_locate_byte_array(gd->fdt_blob, + dev_of_offset(emul), "reg-defaults", + SANDBOX_PMIC_REG_COUNT); if (!reg_defaults) { error("Property \"reg-defaults\" not found for device: %s!", diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c index 307f96bad1..d8f30df371 100644 --- a/drivers/power/pmic/lp873x.c +++ b/drivers/power/pmic/lp873x.c @@ -49,7 +49,7 @@ static int lp873x_bind(struct udevice *dev) int regulators_node; const void *blob = gd->fdt_blob; int children; - int node = dev->of_offset; + int node = dev_of_offset(dev); regulators_node = fdt_subnode_offset(blob, node, "regulators"); diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c index dc5a54a6a3..8295fab3f0 100644 --- a/drivers/power/pmic/max77686.c +++ b/drivers/power/pmic/max77686.c @@ -54,7 +54,7 @@ static int max77686_bind(struct udevice *dev) const void *blob = gd->fdt_blob; int children; - regulators_node = fdt_subnode_offset(blob, dev->of_offset, + regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev), "voltage-regulators"); if (regulators_node <= 0) { debug("%s: %s regulators subnode not found!", __func__, diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c index 0ab425e5dc..f5a23073c4 100644 --- a/drivers/power/pmic/palmas.c +++ b/drivers/power/pmic/palmas.c @@ -49,7 +49,7 @@ static int palmas_bind(struct udevice *dev) int pmic_node = -1, regulators_node; const void *blob = gd->fdt_blob; int children; - int node = dev->of_offset; + int node = dev_of_offset(dev); int subnode, len; fdt_for_each_subnode(subnode, blob, node) { diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c index 3beb48eeac..90a43f2fe5 100644 --- a/drivers/power/pmic/pfuze100.c +++ b/drivers/power/pmic/pfuze100.c @@ -56,7 +56,7 @@ static int pfuze100_bind(struct udevice *dev) int regulators_node; const void *blob = gd->fdt_blob; - regulators_node = fdt_subnode_offset(blob, dev->of_offset, + regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev), "regulators"); if (regulators_node <= 0) { debug("%s: %s regulators subnode not found!", __func__, diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c index 7211026aec..0f7fa517f9 100644 --- a/drivers/power/pmic/pmic-uclass.c +++ b/drivers/power/pmic/pmic-uclass.c @@ -33,7 +33,7 @@ int pmic_bind_children(struct udevice *pmic, int offset, int ret; debug("%s for '%s' at node offset: %d\n", __func__, pmic->name, - pmic->of_offset); + dev_of_offset(pmic)); for (node = fdt_first_subnode(blob, offset); node > 0; diff --git a/drivers/power/pmic/rk808.c b/drivers/power/pmic/rk808.c index 770f471672..3f5f316b56 100644 --- a/drivers/power/pmic/rk808.c +++ b/drivers/power/pmic/rk808.c @@ -61,7 +61,7 @@ static int rk808_bind(struct udevice *dev) int regulators_node; int children; - regulators_node = fdt_subnode_offset(blob, dev->of_offset, + regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev), "regulators"); if (regulators_node <= 0) { debug("%s: %s regulators subnode not found!", __func__, diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c index 075fe7e2f1..25d673b998 100644 --- a/drivers/power/pmic/s5m8767.c +++ b/drivers/power/pmic/s5m8767.c @@ -58,7 +58,7 @@ static int s5m8767_bind(struct udevice *dev) const void *blob = gd->fdt_blob; int children; - node = fdt_subnode_offset(blob, dev->of_offset, "regulators"); + node = fdt_subnode_offset(blob, dev_of_offset(dev), "regulators"); if (node <= 0) { debug("%s: %s regulators subnode not found!", __func__, dev->name); diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c index 3e56acd5e2..b4e412eb3e 100644 --- a/drivers/power/pmic/sandbox.c +++ b/drivers/power/pmic/sandbox.c @@ -51,7 +51,7 @@ static int sandbox_pmic_read(struct udevice *dev, uint reg, static int sandbox_pmic_bind(struct udevice *dev) { - if (!pmic_bind_children(dev, dev->of_offset, pmic_children_info)) + if (!pmic_bind_children(dev, dev_of_offset(dev), pmic_children_info)) error("%s:%d PMIC: %s - no child found!", __func__, __LINE__, dev->name); diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c index 4797f327fa..b30a7f08e9 100644 --- a/drivers/power/pmic/tps65090.c +++ b/drivers/power/pmic/tps65090.c @@ -56,7 +56,7 @@ static int tps65090_bind(struct udevice *dev) const void *blob = gd->fdt_blob; int children; - regulators_node = fdt_subnode_offset(blob, dev->of_offset, + regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev), "regulators"); if (regulators_node <= 0) { debug("%s: %s regulators subnode not found!", __func__, diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c index 3d2d9081c1..cd5213766d 100644 --- a/drivers/power/regulator/fixed.c +++ b/drivers/power/regulator/fixed.c @@ -28,7 +28,7 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) struct fixed_regulator_platdata *dev_pdata; struct gpio_desc *gpio; const void *blob = gd->fdt_blob; - int node = dev->of_offset, flags = GPIOD_IS_OUT; + int node = dev_of_offset(dev), flags = GPIOD_IS_OUT; int ret; dev_pdata = dev_get_platdata(dev); @@ -54,7 +54,7 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) /* Get optional ramp up delay */ dev_pdata->startup_delay_us = fdtdec_get_uint(gd->fdt_blob, - dev->of_offset, + dev_of_offset(dev), "startup-delay-us", 0); return 0; diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c index 0a60a9cfc6..42391c69b4 100644 --- a/drivers/power/regulator/gpio-regulator.c +++ b/drivers/power/regulator/gpio-regulator.c @@ -30,7 +30,7 @@ static int gpio_regulator_ofdata_to_platdata(struct udevice *dev) struct gpio_regulator_platdata *dev_pdata; struct gpio_desc *gpio; const void *blob = gd->fdt_blob; - int node = dev->of_offset; + int node = dev_of_offset(dev); int ret, count, i, j; u32 states_array[8]; diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c index b0a4c5da6d..4875238e43 100644 --- a/drivers/power/regulator/pwm_regulator.c +++ b/drivers/power/regulator/pwm_regulator.c @@ -88,7 +88,7 @@ static int pwm_regulator_ofdata_to_platdata(struct udevice *dev) struct pwm_regulator_info *priv = dev_get_priv(dev); struct fdtdec_phandle_args args; const void *blob = gd->fdt_blob; - int node = dev->of_offset; + int node = dev_of_offset(dev); int ret; ret = fdtdec_parse_phandle_with_args(blob, node, "pwms", "#pwm-cells", diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 52a1070363..2e0b5ed307 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -278,7 +278,7 @@ static bool regulator_name_is_unique(struct udevice *check_dev, static int regulator_post_bind(struct udevice *dev) { struct dm_regulator_uclass_platdata *uc_pdata; - int offset = dev->of_offset; + int offset = dev_of_offset(dev); const void *blob = gd->fdt_blob; const char *property = "regulator-name"; @@ -308,7 +308,7 @@ static int regulator_post_bind(struct udevice *dev) static int regulator_pre_probe(struct udevice *dev) { struct dm_regulator_uclass_platdata *uc_pdata; - int offset = dev->of_offset; + int offset = dev_of_offset(dev); uc_pdata = dev_get_uclass_platdata(dev); if (!uc_pdata) |