public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
To: linux-samsung-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org
Cc: pawel.moll@arm.com, b.zolnierkie@samsung.com,
	sw0312.kim@samsung.com, kyungmin.park@samsung.com,
	robh+dt@kernel.org, rahul.sharma@samsung.com,
	m.chehab@samsung.com
Subject: Re: [PATCH 1/4] drm: exynos: hdmi: simplify extracting hpd-gpio from DT
Date: Mon, 14 Apr 2014 17:49:53 +0200	[thread overview]
Message-ID: <534C03A1.6040005@samsung.com> (raw)
In-Reply-To: <1397487622-3577-2-git-send-email-t.stanislaws@samsung.com>

On 04/14/2014 05:00 PM, Tomasz Stanislawski wrote:
> This patch eliminates redundant checks while retrieving HPD gpio from DT during
> HDMI's probe().
> 
> Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c |   13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 9a6d652..d2d6e2e 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -2016,23 +2016,18 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
>  {
>  	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;
> +		return NULL;
>  
> -	if (!of_find_property(np, "hpd-gpio", &value)) {
> +	pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
> +	if (gpio_is_valid(pd->hpd_gpio)) {

Sorry. Should be !gpio_is_valid().

>  		DRM_ERROR("no hpd gpio property found\n");
> -		goto err_data;
> +		return NULL;
>  	}
>  
> -	pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
> -
>  	return pd;
> -
> -err_data:
> -	return NULL;
>  }
>  
>  static struct of_device_id hdmi_match_types[] = {
> 


  reply	other threads:[~2014-04-14 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 15:00 [PATCH 0/4] drm: exynos: update/fixes to HDMI driver Tomasz Stanislawski
2014-04-14 15:00 ` [PATCH 1/4] drm: exynos: hdmi: simplify extracting hpd-gpio from DT Tomasz Stanislawski
2014-04-14 15:49   ` Tomasz Stanislawski [this message]
2014-04-14 15:00 ` [PATCH 2/4] drm: exynos: mixer: fix using usleep() in atomic context Tomasz Stanislawski
2014-04-14 15:00 ` [PATCH 3/4] drm: exynos: add compatibles for HDMI and Mixer chips and exynos4210 SoC Tomasz Stanislawski
2014-04-15  0:28   ` Joonyoung Shim
2014-04-14 15:00 ` [PATCH 4/4] 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=534C03A1.6040005@samsung.com \
    --to=t.stanislaws@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --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 \
    /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