summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-19 20:40:14 +0300
committerSimon Glass <sjg@chromium.org>2021-01-05 22:24:41 +0300
commitf10643cf8a4ca006d1ad194e930cd292fd869d17 (patch)
tree66cd9383fc5dbd8e02f999d1db5562995f441b21 /drivers/pwm
parent7d14ee443ca674314e0fe5c3e25f48e52a8fd5ee (diff)
downloadu-boot-f10643cf8a4ca006d1ad194e930cd292fd869d17.tar.xz
dm: core: Access device ofnode through functions
At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-meson.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 58b7469f97..03eeacc286 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -304,13 +304,14 @@ static int meson_pwm_probe(struct udevice *dev)
if (strcmp(cdev->driver->name, "fixed_rate_clock"))
continue;
- str = ofnode_read_string(cdev->node, "clock-output-names");
+ str = ofnode_read_string(dev_ofnode(cdev),
+ "clock-output-names");
if (!str)
continue;
if (!strcmp(str, "xtal")) {
err = uclass_get_device_by_ofnode(UCLASS_CLK,
- cdev->node,
+ dev_ofnode(cdev),
&cdev);
if (err) {
printf("%s%d: Failed to get xtal clk\n", __func__, i);
@@ -345,7 +346,9 @@ static int meson_pwm_probe(struct udevice *dev)
return -EINVAL;
}
- err = uclass_get_device_by_ofnode(UCLASS_CLK, cdev->node, &cdev);
+ err = uclass_get_device_by_ofnode(UCLASS_CLK,
+ dev_ofnode(cdev),
+ &cdev);
if (err) {
printf("%s%d: Failed to get clk controller\n", __func__, i);
return err;