All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Philipp Zabel <p.zabel@pengutronix.de>, dri-devel@lists.freedesktop.org
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	kernel@pengutronix.de, Hyungwon Hwang <human.hwang@samsung.com>
Subject: Re: [PATCH 2/2] drm/exynos/dsi: use of_graph_get_endpoint_by_regs helper
Date: Wed, 04 May 2016 08:20:48 +0200	[thread overview]
Message-ID: <572994C0.3030402@samsung.com> (raw)
In-Reply-To: <1462283245-10586-2-git-send-email-p.zabel@pengutronix.de>

On 05/03/2016 03:47 PM, Philipp Zabel wrote:
> This allows to remove the local of_graph_get_port_by_reg(),
> of_graph_get_endpoint_by_reg(), and of_get_child_by_name_reg()
> functions.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej

> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 57 ++-------------------------------
>  1 file changed, 3 insertions(+), 54 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 63c84a1..61251fe 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1641,50 +1641,6 @@ static const struct drm_encoder_funcs exynos_dsi_encoder_funcs = {
>  
>  MODULE_DEVICE_TABLE(of, exynos_dsi_of_match);
>  
> -/* of_* functions will be removed after merge of of_graph patches */
> -static struct device_node *
> -of_get_child_by_name_reg(struct device_node *parent, const char *name, u32 reg)
> -{
> -	struct device_node *np;
> -
> -	for_each_child_of_node(parent, np) {
> -		u32 r;
> -
> -		if (!np->name || of_node_cmp(np->name, name))
> -			continue;
> -
> -		if (of_property_read_u32(np, "reg", &r) < 0)
> -			r = 0;
> -
> -		if (reg == r)
> -			break;
> -	}
> -
> -	return np;
> -}
> -
> -static struct device_node *of_graph_get_port_by_reg(struct device_node *parent,
> -						    u32 reg)
> -{
> -	struct device_node *ports, *port;
> -
> -	ports = of_get_child_by_name(parent, "ports");
> -	if (ports)
> -		parent = ports;
> -
> -	port = of_get_child_by_name_reg(parent, "port", reg);
> -
> -	of_node_put(ports);
> -
> -	return port;
> -}
> -
> -static struct device_node *
> -of_graph_get_endpoint_by_reg(struct device_node *port, u32 reg)
> -{
> -	return of_get_child_by_name_reg(port, "endpoint", reg);
> -}
> -
>  static int exynos_dsi_of_read_u32(const struct device_node *np,
>  				  const char *propname, u32 *out_value)
>  {
> @@ -1706,7 +1662,7 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
>  {
>  	struct device *dev = dsi->dev;
>  	struct device_node *node = dev->of_node;
> -	struct device_node *port, *ep;
> +	struct device_node *ep;
>  	int ret;
>  
>  	ret = exynos_dsi_of_read_u32(node, "samsung,pll-clock-frequency",
> @@ -1714,16 +1670,9 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
>  	if (ret < 0)
>  		return ret;
>  
> -	port = of_graph_get_port_by_reg(node, DSI_PORT_OUT);
> -	if (!port) {
> -		dev_err(dev, "no output port specified\n");
> -		return -EINVAL;
> -	}
> -
> -	ep = of_graph_get_endpoint_by_reg(port, 0);
> -	of_node_put(port);
> +	ep = of_graph_get_endpoint_by_regs(node, DSI_PORT_OUT, 0);
>  	if (!ep) {
> -		dev_err(dev, "no endpoint specified in output port\n");
> +		dev_err(dev, "no output port with endpoint specified\n");
>  		return -EINVAL;
>  	}
>  
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-05-04  6:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 13:47 [PATCH 1/2] drm/exynos/dpi: use of_graph_get_endpoint_by_regs helper Philipp Zabel
2016-05-03 13:47 ` [PATCH 2/2] drm/exynos/dsi: " Philipp Zabel
2016-05-04  6:20   ` Andrzej Hajda [this message]
2016-05-04  6:20 ` [PATCH 1/2] drm/exynos/dpi: " Andrzej Hajda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=572994C0.3030402@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=human.hwang@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=kyungmin.park@samsung.com \
    --cc=p.zabel@pengutronix.de \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.