Re: [PATCHv3 1/5] drm: exynos: hdmi: remove usage of struct s5p_hdmi_platform_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux