[PATCH v2 1/3] drm/vc4: Remove the need for the GPU-subsystem DT node.

Rob Herring robh+dt at kernel.org
Mon Apr 16 20:33:49 UTC 2018


On Mon, Apr 16, 2018 at 12:25 PM, Eric Anholt <eric at anholt.net> wrote:
> The GPU subsystem node was a workaround to have a central device to
> bind V3D and display to.  Following the lead of 246774d17fc0
> ("drm/etnaviv: remove the need for a gpu-subsystem DT node"), remove
> the subsystem node usage and just create a platform device for the DRM
> device to attach to if any of the subsystem devices are present.
>
> v2: Simplify the DT walking code.

> +static bool
> +driver_of_table_has_a_match(const struct platform_driver *driver)
> +{
> +       struct device_node *node;
> +
> +       node = of_find_matching_node_and_match(NULL,
> +                                              driver->driver.of_match_table,
> +                                              NULL);
> +       if (of_device_is_available(node)) {
> +               of_node_put(node);

You need to put the node regardless.

> +               return true;
> +       }
> +
> +       return false;
> +}


More information about the dri-devel mailing list