@@ -519,13 +519,13 @@ static int mtk_disp_ovl_adaptor_probe(struct platform_device *pdev)
component_master_add_with_match(dev, &mtk_disp_ovl_adaptor_master_ops, match);
- pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
ret = component_add(dev, &mtk_disp_ovl_adaptor_comp_ops);
- if (ret) {
- pm_runtime_disable(dev);
+ if (ret)
return dev_err_probe(dev, ret, "Failed to add component\n");
- }
return 0;
}
@@ -533,7 +533,6 @@ static int mtk_disp_ovl_adaptor_probe(struct platform_device *pdev)
static int mtk_disp_ovl_adaptor_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &mtk_disp_ovl_adaptor_master_ops);
- pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -360,13 +360,13 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv);
- pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
ret = component_add(dev, &mtk_disp_rdma_component_ops);
- if (ret) {
- pm_runtime_disable(dev);
+ if (ret)
return dev_err_probe(dev, ret, "Failed to add component\n");
- }
return 0;
}
@@ -374,9 +374,6 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev)
static int mtk_disp_rdma_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &mtk_disp_rdma_component_ops);
-
- pm_runtime_disable(&pdev->dev);
-
return 0;
}
@@ -299,20 +299,20 @@ static int mtk_mdp_rdma_probe(struct platform_device *pdev)
#endif
platform_set_drvdata(pdev, priv);
- pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
ret = component_add(dev, &mtk_mdp_rdma_component_ops);
- if (ret) {
- pm_runtime_disable(dev);
+ if (ret)
return dev_err_probe(dev, ret, "Failed to add component\n");
- }
+
return 0;
}
static int mtk_mdp_rdma_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &mtk_mdp_rdma_component_ops);
- pm_runtime_disable(&pdev->dev);
return 0;
}