linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: Remove redundant of_device_is_available check
@ 2019-09-20 17:29 megous
  2019-09-20 20:09 ` Sean Paul
  0 siblings, 1 reply; 2+ messages in thread
From: megous @ 2019-09-20 17:29 UTC (permalink / raw)
  To: dri-devel
  Cc: Ondrej Jirman, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	David Airlie, Daniel Vetter, open list

From: Ondrej Jirman <megous@megous.com>

This check is already performed by of_graph_get_remote_node. No
need to repeat it immediately after the call.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 drivers/gpu/drm/drm_of.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 43d89dd59c6b..0ca58803ba46 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -247,17 +247,12 @@ int drm_of_find_panel_or_bridge(const struct device_node *np,
 		*panel = NULL;
 
 	remote = of_graph_get_remote_node(np, port, endpoint);
 	if (!remote)
 		return -ENODEV;
 
-	if (!of_device_is_available(remote)) {
-		of_node_put(remote);
-		return -ENODEV;
-	}
-
 	if (panel) {
 		*panel = of_drm_find_panel(remote);
 		if (!IS_ERR(*panel))
 			ret = 0;
 		else
 			*panel = NULL;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: Remove redundant of_device_is_available check
  2019-09-20 17:29 [PATCH] drm: Remove redundant of_device_is_available check megous
@ 2019-09-20 20:09 ` Sean Paul
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Paul @ 2019-09-20 20:09 UTC (permalink / raw)
  To: megous
  Cc: dri-devel, Maarten Lankhorst, Maxime Ripard, David Airlie,
	Daniel Vetter, open list

On Fri, Sep 20, 2019 at 1:29 PM <megous@megous.com> wrote:
>
> From: Ondrej Jirman <megous@megous.com>
>
> This check is already performed by of_graph_get_remote_node. No
> need to repeat it immediately after the call.
>
> Signed-off-by: Ondrej Jirman <megous@megous.com>

Thanks for your patch, I've applied it to drm-misc-next.

Sean

> ---
>  drivers/gpu/drm/drm_of.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index 43d89dd59c6b..0ca58803ba46 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -247,17 +247,12 @@ int drm_of_find_panel_or_bridge(const struct device_node *np,
>                 *panel = NULL;
>
>         remote = of_graph_get_remote_node(np, port, endpoint);
>         if (!remote)
>                 return -ENODEV;
>
> -       if (!of_device_is_available(remote)) {
> -               of_node_put(remote);
> -               return -ENODEV;
> -       }
> -
>         if (panel) {
>                 *panel = of_drm_find_panel(remote);
>                 if (!IS_ERR(*panel))
>                         ret = 0;
>                 else
>                         *panel = NULL;
> --
> 2.23.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-20 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 17:29 [PATCH] drm: Remove redundant of_device_is_available check megous
2019-09-20 20:09 ` Sean Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).