lede/target/linux/rockchip/patches-6.12/341-07-pwm-pwmv4-add-device-set-of-node-from-parent.patch

14 lines
428 B
Diff

diff --git a/drivers/pwm/pwm-rockchip-v4.c b/drivers/pwm/pwm-rockchip-v4.c
index 980b27454..3bc3d4979 100644
--- a/drivers/pwm/pwm-rockchip-v4.c
+++ b/drivers/pwm/pwm-rockchip-v4.c
@@ -292,6 +292,8 @@ static int rockchip_pwm_v4_probe(struct platform_device *pdev)
if (IS_ERR(chip))
return PTR_ERR(chip);
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
+
pc = to_rockchip_pwm_v4(chip);
pc->pwmf = pwmf;