Re: [PATCH] drm: Remove the struct drm_device platformdev field

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

 



On Sun, Dec 18, 2016 at 12:39:16AM +0200, Laurent Pinchart wrote:
> The field contains a pointer to the parent platform device of the DRM
> device. As struct drm_device also contains a dev pointer to the struct
> device embedded in the platform_device structure, the platformdev field
> is redundant. Remove it and use the dev pointer directly.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/armada/armada_drv.c             | 3 +--
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 5 ++---
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 --
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c         | 2 +-
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c         | 2 +-
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c        | 2 +-
>  drivers/gpu/drm/msm/msm_drv.c                   | 1 -
>  drivers/gpu/drm/nouveau/nouveau_drm.c           | 3 +--
>  drivers/gpu/drm/sti/sti_drv.c                   | 2 --
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c             | 1 -
>  include/drm/drmP.h                              | 1 -
>  11 files changed, 7 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
> index 07086b427c22..f6442ed23bcd 100644
> --- a/drivers/gpu/drm/armada/armada_drv.c
> +++ b/drivers/gpu/drm/armada/armada_drv.c
> @@ -154,10 +154,9 @@ static int armada_drm_bind(struct device *dev)
>  		return ret;
>  	}
>  
> -	priv->drm.platformdev = to_platform_device(dev);
>  	priv->drm.dev_private = priv;
>  
> -	platform_set_drvdata(priv->drm.platformdev, &priv->drm);
> +	dev_set_drvdata(dev, &priv->drm);
>  
>  	INIT_WORK(&priv->fb_unref_work, armada_drm_unref_work);
>  	INIT_KFIFO(priv->fb_unref);

For Armada,

Acked-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>

Thanks.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux