diff options
Diffstat (limited to 'drivers/gpu/drm/sti/sti_drv.c')
| -rw-r--r-- | drivers/gpu/drm/sti/sti_drv.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 5e9332df21df..f16345f01065 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -22,6 +22,7 @@ #include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> +#include <drm/drm_print.h> #include <drm/drm_probe_helper.h> #include "sti_drv.h" @@ -231,23 +232,15 @@ static const struct component_master_ops sti_ops = { static int sti_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *node = dev->of_node; - struct device_node *child_np; - struct component_match *match = NULL; + int ret; - dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); + ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); + if (ret) + return ret; devm_of_platform_populate(dev); - child_np = of_get_next_available_child(node, NULL); - - while (child_np) { - drm_of_component_match_add(dev, &match, component_compare_of, - child_np); - child_np = of_get_next_available_child(node, child_np); - } - - return component_master_add_with_match(dev, &sti_ops, match); + return drm_of_component_probe(dev, component_compare_of, &sti_ops); } static void sti_platform_remove(struct platform_device *pdev) |
