提交 5247e2aa 编写于 作者: L Lucas Stach

drm/etnaviv: don't fail GPU bind when CONFIG_THERMAL isn't enabled

The stub functions returns -ENODEV when trying to register the cooling device,
thus failing the GPU bind, rendering the GPU subsystem unusable when
CONFIG_THERMAL isn't enabled.
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
上级 23d1dd03
......@@ -1622,10 +1622,12 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master,
struct etnaviv_gpu *gpu = dev_get_drvdata(dev);
int ret;
gpu->cooling = thermal_of_cooling_device_register(dev->of_node,
if (IS_ENABLED(CONFIG_THERMAL)) {
gpu->cooling = thermal_of_cooling_device_register(dev->of_node,
(char *)dev_name(dev), gpu, &cooling_ops);
if (IS_ERR(gpu->cooling))
return PTR_ERR(gpu->cooling);
if (IS_ERR(gpu->cooling))
return PTR_ERR(gpu->cooling);
}
#ifdef CONFIG_PM
ret = pm_runtime_get_sync(gpu->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册