|
@@ -1738,7 +1738,7 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master,
|
|
|
struct etnaviv_gpu *gpu = dev_get_drvdata(dev);
|
|
|
int ret;
|
|
|
|
|
|
- if (IS_ENABLED(CONFIG_THERMAL)) {
|
|
|
+ if (IS_ENABLED(CONFIG_DRM_ETNAVIV_THERMAL)) {
|
|
|
gpu->cooling = thermal_of_cooling_device_register(dev->of_node,
|
|
|
(char *)dev_name(dev), gpu, &cooling_ops);
|
|
|
if (IS_ERR(gpu->cooling))
|
|
@@ -1751,7 +1751,8 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master,
|
|
|
ret = etnaviv_gpu_clk_enable(gpu);
|
|
|
#endif
|
|
|
if (ret < 0) {
|
|
|
- thermal_cooling_device_unregister(gpu->cooling);
|
|
|
+ if (IS_ENABLED(CONFIG_DRM_ETNAVIV_THERMAL))
|
|
|
+ thermal_cooling_device_unregister(gpu->cooling);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
@@ -1808,7 +1809,8 @@ static void etnaviv_gpu_unbind(struct device *dev, struct device *master,
|
|
|
|
|
|
gpu->drm = NULL;
|
|
|
|
|
|
- thermal_cooling_device_unregister(gpu->cooling);
|
|
|
+ if (IS_ENABLED(CONFIG_DRM_ETNAVIV_THERMAL))
|
|
|
+ thermal_cooling_device_unregister(gpu->cooling);
|
|
|
gpu->cooling = NULL;
|
|
|
}
|
|
|
|