[PATCH] drm: use getter/setter functions

Daniel Vetter daniel at ffwll.ch
Thu Feb 11 00:11:14 AEDT 2021


On Tue, Feb 09, 2021 at 10:13:04PM +0100, Julia Lawall wrote:
> Use getter and setter functions, for platform_device structures and a
> mipi_dsi_device structure.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall at inria.fr>

Applied to drm-misc-next, thanks for the patch.
-Daniel
> 
> ---
>  drivers/gpu/drm/aspeed/aspeed_gfx_drv.c             |    2 +-
>  drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c |    2 +-
>  drivers/gpu/drm/panel/panel-lvds.c                  |    2 +-
>  drivers/gpu/drm/panel/panel-seiko-43wvf1g.c         |    4 ++--
>  drivers/gpu/drm/panel/panel-simple.c                |    2 +-
>  drivers/gpu/drm/rockchip/rockchip_lvds.c            |    2 +-
>  6 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 4e2dad314c79..9858079f9e14 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -4800,7 +4800,7 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
>  
>  	err = mipi_dsi_attach(dsi);
>  	if (err) {
> -		struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
> +		struct panel_simple *panel = mipi_dsi_get_drvdata(dsi);
>  
>  		drm_panel_remove(&panel->base);
>  	}
> diff --git a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
> index 0ee508576231..3939b25e6666 100644
> --- a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
> +++ b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
> @@ -267,7 +267,7 @@ static int seiko_panel_probe(struct device *dev,
>  
>  static int seiko_panel_remove(struct platform_device *pdev)
>  {
> -	struct seiko_panel *panel = dev_get_drvdata(&pdev->dev);
> +	struct seiko_panel *panel = platform_get_drvdata(pdev);
>  
>  	drm_panel_remove(&panel->base);
>  	drm_panel_disable(&panel->base);
> @@ -277,7 +277,7 @@ static int seiko_panel_remove(struct platform_device *pdev)
>  
>  static void seiko_panel_shutdown(struct platform_device *pdev)
>  {
> -	struct seiko_panel *panel = dev_get_drvdata(&pdev->dev);
> +	struct seiko_panel *panel = platform_get_drvdata(pdev);
>  
>  	drm_panel_disable(&panel->base);
>  }
> diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> index 654bc52d9ff3..bd5ba10822c2 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> @@ -725,7 +725,7 @@ static int rockchip_lvds_probe(struct platform_device *pdev)
>  
>  static int rockchip_lvds_remove(struct platform_device *pdev)
>  {
> -	struct rockchip_lvds *lvds = dev_get_drvdata(&pdev->dev);
> +	struct rockchip_lvds *lvds = platform_get_drvdata(pdev);
>  
>  	component_del(&pdev->dev, &rockchip_lvds_component_ops);
>  	clk_unprepare(lvds->pclk);
> diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
> index 457ec04950f7..c7707338bfdb 100644
> --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
> +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
> @@ -284,7 +284,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	dev_set_drvdata(&pdev->dev, priv);
> +	platform_set_drvdata(pdev, priv);
>  
>  	ret = sysfs_create_group(&pdev->dev.kobj, &aspeed_sysfs_attr_group);
>  	if (ret)
> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
> index d0c65610ebb5..989a05bc8197 100644
> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
> @@ -2457,7 +2457,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
>  
>  static int cdns_mhdp_remove(struct platform_device *pdev)
>  {
> -	struct cdns_mhdp_device *mhdp = dev_get_drvdata(&pdev->dev);
> +	struct cdns_mhdp_device *mhdp = platform_get_drvdata(pdev);
>  	unsigned long timeout = msecs_to_jiffies(100);
>  	bool stop_fw = false;
>  	int ret;
> diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
> index 66c7d765b8f7..59a8d99e777d 100644
> --- a/drivers/gpu/drm/panel/panel-lvds.c
> +++ b/drivers/gpu/drm/panel/panel-lvds.c
> @@ -244,7 +244,7 @@ static int panel_lvds_probe(struct platform_device *pdev)
>  
>  static int panel_lvds_remove(struct platform_device *pdev)
>  {
> -	struct panel_lvds *lvds = dev_get_drvdata(&pdev->dev);
> +	struct panel_lvds *lvds = platform_get_drvdata(pdev);
>  
>  	drm_panel_remove(&lvds->panel);
>  
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Linux-aspeed mailing list