}
}
+static void vc4_component_unbind_all(void *ptr)
+{
+ struct vc4_dev *vc4 = ptr;
+
+ component_unbind_all(vc4->dev, &vc4->base);
+}
+
const struct of_device_id vc4_dma_range_matches[] = {
{ .compatible = "brcm,bcm2835-hvs" },
{ .compatible = "brcm,bcm2711-hvs" },
if (IS_ERR(vc4))
return PTR_ERR(vc4);
vc4->is_vc5 = is_vc5;
+ vc4->dev = dev;
drm = &vc4->base;
platform_set_drvdata(pdev, drm);
if (ret)
return ret;
+ ret = devm_add_action_or_reset(dev, vc4_component_unbind_all, vc4);
+ if (ret)
+ return ret;
+
if (!vc4->firmware_kms) {
ret = vc4_plane_create_additional_planes(drm);
if (ret)
return 0;
unbind_all:
- component_unbind_all(dev, drm);
-
return ret;
}