Patchwork [15/48] drm: omapdrm: displays: Remove OF node check in encoder drivers

login
register
mail settings
Submitter Laurent Pinchart
Date Oct. 13, 2017, 2:59 p.m.
Message ID <20171013145944.26557-16-laurent.pinchart@ideasonboard.com>
Download mbox | patch
Permalink /patch/10004997/
State New
Headers show

Comments

Laurent Pinchart - Oct. 13, 2017, 2:59 p.m.
No encoder is instantiated through platform data anymore, there is no
need to check for OF node presence.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/displays/encoder-opa362.c    | 5 -----
 drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c    | 3 ---
 drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 3 ---
 3 files changed, 11 deletions(-)
Sebastian Reichel - Oct. 14, 2017, 12:44 p.m.
Hi,

On Fri, Oct 13, 2017 at 05:59:11PM +0300, Laurent Pinchart wrote:
> No encoder is instantiated through platform data anymore, there is no
> need to check for OF node presence.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  drivers/gpu/drm/omapdrm/displays/encoder-opa362.c    | 5 -----
>  drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c    | 3 ---
>  drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 3 ---
>  3 files changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> index b1f6aa09f699..b28ec62267b1 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> @@ -179,11 +179,6 @@ static int opa362_probe(struct platform_device *pdev)
>  
>  	dev_dbg(&pdev->dev, "probe\n");
>  
> -	if (node == NULL) {
> -		dev_err(&pdev->dev, "Unable to find device tree\n");
> -		return -EINVAL;
> -	}
> -
>  	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
>  	if (!ddata)
>  		return -ENOMEM;
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
> index b8e420c7d680..9e0ab4e77366 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
> @@ -201,9 +201,6 @@ static int tfp410_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, ddata);
>  
> -	if (!pdev->dev.of_node)
> -		return -ENODEV;
> -
>  	r = tfp410_probe_of(pdev);
>  	if (r)
>  		return r;
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> index e3d98d78fc40..6c478140a52e 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> @@ -299,9 +299,6 @@ static int tpd_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, ddata);
>  
> -	if (!pdev->dev.of_node)
> -		return -ENODEV;
> -
>  	r = tpd_probe_of(pdev);
>  	if (r)
>  		return r;
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch

diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index b1f6aa09f699..b28ec62267b1 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -179,11 +179,6 @@  static int opa362_probe(struct platform_device *pdev)
 
 	dev_dbg(&pdev->dev, "probe\n");
 
-	if (node == NULL) {
-		dev_err(&pdev->dev, "Unable to find device tree\n");
-		return -EINVAL;
-	}
-
 	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
 	if (!ddata)
 		return -ENOMEM;
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
index b8e420c7d680..9e0ab4e77366 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
@@ -201,9 +201,6 @@  static int tfp410_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ddata);
 
-	if (!pdev->dev.of_node)
-		return -ENODEV;
-
 	r = tfp410_probe_of(pdev);
 	if (r)
 		return r;
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
index e3d98d78fc40..6c478140a52e 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
@@ -299,9 +299,6 @@  static int tpd_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ddata);
 
-	if (!pdev->dev.of_node)
-		return -ENODEV;
-
 	r = tpd_probe_of(pdev);
 	if (r)
 		return r;