lkml.org 
[lkml]   [2018]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/3] drm/vc4: Remove the need for the GPU-subsystem DT node.
On Mon, Apr 16, 2018 at 12:25 PM, Eric Anholt <eric@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;
> +}

\
 
 \ /
  Last update: 2018-04-16 22:35    [W:0.034 / U:13.748 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site