@@ -215,8 +215,9 @@ static const struct drm_driver mcde_drm_driver = {
DRM_GEM_CMA_DRIVER_OPS,
};
-static int mcde_drm_bind(struct device *dev)
+static int mcde_drm_bind(struct aggregate_device *adev)
{
+ struct device *dev = aggregate_device_parent(adev);
struct drm_device *drm = dev_get_drvdata(dev);
int ret;
@@ -247,8 +248,9 @@ static int mcde_drm_bind(struct device *dev)
return ret;
}
-static void mcde_drm_unbind(struct device *dev)
+static void mcde_drm_unbind(struct aggregate_device *adev)
{
+ struct device *dev = aggregate_device_parent(adev);
struct drm_device *drm = dev_get_drvdata(dev);
drm_dev_unregister(drm);
@@ -256,9 +258,13 @@ static void mcde_drm_unbind(struct device *dev)
component_unbind_all(drm->dev, drm);
}
-static const struct component_master_ops mcde_drm_comp_ops = {
- .bind = mcde_drm_bind,
- .unbind = mcde_drm_unbind,
+static struct aggregate_driver mcde_drm_comp_driver = {
+ .probe = mcde_drm_bind,
+ .remove = mcde_drm_unbind,
+ .driver = {
+ .name = "mcde_drm",
+ .owner = THIS_MODULE,
+ },
};
static struct platform_driver *const mcde_component_drivers[] = {
@@ -419,7 +425,7 @@ static int mcde_probe(struct platform_device *pdev)
* Perform an invasive reset of the MCDE and all blocks by
* cutting the power to the subsystem, then bring it back up
* later when we enable the display as a result of
- * component_master_add_with_match().
+ * component_aggregate_register().
*/
ret = regulator_disable(mcde->epod);
if (ret) {
@@ -429,8 +435,7 @@ static int mcde_probe(struct platform_device *pdev)
/* Wait 50 ms so we are sure we cut the power */
usleep_range(50000, 70000);
- ret = component_master_add_with_match(&pdev->dev, &mcde_drm_comp_ops,
- match);
+ ret = component_aggregate_register(&pdev->dev, &mcde_drm_comp_driver, match);
if (ret) {
dev_err(dev, "failed to add component master\n");
/*
@@ -459,7 +464,7 @@ static int mcde_remove(struct platform_device *pdev)
struct drm_device *drm = platform_get_drvdata(pdev);
struct mcde *mcde = to_mcde(drm);
- component_master_del(&pdev->dev, &mcde_drm_comp_ops);
+ component_aggregate_unregister(&pdev->dev, &mcde_drm_comp_driver);
clk_disable_unprepare(mcde->mcde_clk);
regulator_disable(mcde->vana);
regulator_disable(mcde->epod);