dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Tomasz Stanislawski <t.stanislaws@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Cc: m.chehab@samsung.com, robh+dt@kernel.org, inki.dae@samsung.com,
	kyungmin.park@samsung.com, sw0312.kim@samsung.com,
	t.figa@samsung.com, b.zolnierkie@samsung.com,
	rahul.sharma@samsung.com, pawel.moll@arm.com,
	l.stach@pengutronix.de
Subject: Re: [PATCHv3 1/5] drm: exynos: hdmi: remove usage of struct s5p_hdmi_platform_data
Date: Thu, 17 Apr 2014 10:54:47 +0900	[thread overview]
Message-ID: <534F3467.1070707@samsung.com> (raw)
In-Reply-To: <1397661178-6016-2-git-send-email-t.stanislaws@samsung.com>

Hi Tomasz,

On 04/17/2014 12:12 AM, Tomasz Stanislawski wrote:
> This patch continues shift of DRM EXYNOS to DT-only configuration.
> The usage of the old structure for HDMI's platform data is
> removed.
>
> Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
> ---
>   drivers/gpu/drm/exynos/exynos_hdmi.c |   30 ++++++++----------------------
>   1 file changed, 8 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 9a6d652..482ca77 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -43,7 +43,6 @@
>   #include "exynos_mixer.h"
>   
>   #include <linux/gpio.h>
> -#include <media/s5p_hdmi.h>
>   
>   #define get_hdmi_display(dev)	platform_get_drvdata(to_platform_device(dev))
>   #define ctx_from_connector(c)	container_of(c, struct hdmi_context, connector)
> @@ -2011,28 +2010,18 @@ fail:
>   	return -ENODEV;
>   }
>   
> -static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
> -					(struct device *dev)
> +static int drm_hdmi_dt_parse(struct hdmi_context *hdata, struct device_node *np)
>   {
> -	struct device_node *np = dev->of_node;
> -	struct s5p_hdmi_platform_data *pd;
>   	u32 value;
>   
> -	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> -	if (!pd)
> -		goto err_data;
> -
>   	if (!of_find_property(np, "hpd-gpio", &value)) {
>   		DRM_ERROR("no hpd gpio property found\n");
> -		goto err_data;
> +		return -ENOENT;
>   	}
>   
> -	pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
> -
> -	return pd;
> +	hdata->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
>   
> -err_data:
> -	return NULL;
> +	return 0;
>   }
>   
>   static struct of_device_id hdmi_match_types[] = {
> @@ -2051,7 +2040,6 @@ static int hdmi_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct hdmi_context *hdata;
> -	struct s5p_hdmi_platform_data *pdata;
>   	struct resource *res;
>   	const struct of_device_id *match;
>   	struct device_node *ddc_node, *phy_node;
> @@ -2061,14 +2049,14 @@ static int hdmi_probe(struct platform_device *pdev)
>   	 if (!dev->of_node)
>   		return -ENODEV;
>   
> -	pdata = drm_hdmi_dt_parse_pdata(dev);
> -	if (!pdata)
> -		return -EINVAL;
> -
>   	hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
>   	if (!hdata)
>   		return -ENOMEM;
>   
> +	ret = drm_hdmi_dt_parse(hdata, dev->of_node);
> +	if (ret)
> +		return -EINVAL;

It's better to return ret value.

  reply	other threads:[~2014-04-17  1:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 15:12 [PATCHv3 0/5] drm: exynos: update/fixes to HDMI driver Tomasz Stanislawski
2014-04-16 15:12 ` [PATCHv3 1/5] drm: exynos: hdmi: remove usage of struct s5p_hdmi_platform_data Tomasz Stanislawski
2014-04-17  1:54   ` Joonyoung Shim [this message]
2014-04-17  7:26     ` Tomasz Stanislawski
2014-04-16 15:12 ` [PATCHv3 2/5] drm: exynos: hdmi: simplify extracting hpd-gpio from DT Tomasz Stanislawski
2014-04-16 15:12 ` [PATCHv3 3/5] drm: exynos: mixer: fix using usleep() in atomic context Tomasz Stanislawski
2014-04-16 15:12 ` [PATCHv3 4/5] drm: exynos: add compatibles for HDMI and Mixer chips and exynos4210 SoC Tomasz Stanislawski
2014-04-16 15:12 ` [PATCHv3 5/5] drm: exynos: hdmi: add support for pixel clock limitation Tomasz Stanislawski

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=534F3467.1070707@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=pawel.moll@arm.com \
    --cc=rahul.sharma@samsung.com \
    --cc=robh+dt@kernel.org \
    --cc=sw0312.kim@samsung.com \
    --cc=t.figa@samsung.com \
    --cc=t.stanislaws@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox