thermal/core: associate device tree node to thermal_cooling_device::device
PATCH 1/1 thermal/core: associate device tree node to thermal_cooling_device::device
When adding a gpio property to a cooling device node in device tree, then in thermal driver called gpiod_get(struct device *) to request this gpio will fail, indicate cannot find gpio in device tree, because the of node do not associate to struct device.
Signed-off-by Jianeng Chen <[email protected]>
--- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+)
drivers/thermal/thermal_core.c +1 -0
@@ -905,6 +905,7 @@ __thermal_cooling_device_register(struct device_node *np, cdev->ops = ops; cdev->updated = false; cdev->device.class = thermal_class; + cdev->device.of_node = np; cdev->devdata = devdata; ret = cdev->ops->get_max_state (cdev, &cdev->max_state);
Signature · 1 line
2.7.4