Commit 5dd331d4 authored by Julia Lawall's avatar Julia Lawall Committed by Daniel Vetter

drm: use getter/setter functions

Use getter and setter functions, for platform_device structures and a
mipi_dsi_device structure.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209211304.1261740-1-Julia.Lawall@inria.fr
parent f66aaab8
...@@ -319,7 +319,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev) ...@@ -319,7 +319,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev)
if (ret) if (ret)
return 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); ret = sysfs_create_group(&pdev->dev.kobj, &aspeed_sysfs_attr_group);
if (ret) if (ret)
......
...@@ -2457,7 +2457,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev) ...@@ -2457,7 +2457,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
static int cdns_mhdp_remove(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); unsigned long timeout = msecs_to_jiffies(100);
bool stop_fw = false; bool stop_fw = false;
int ret; int ret;
......
...@@ -244,7 +244,7 @@ static int panel_lvds_probe(struct platform_device *pdev) ...@@ -244,7 +244,7 @@ static int panel_lvds_probe(struct platform_device *pdev)
static int panel_lvds_remove(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); drm_panel_remove(&lvds->panel);
......
...@@ -267,7 +267,7 @@ static int seiko_panel_probe(struct device *dev, ...@@ -267,7 +267,7 @@ static int seiko_panel_probe(struct device *dev,
static int seiko_panel_remove(struct platform_device *pdev) 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_remove(&panel->base);
drm_panel_disable(&panel->base); drm_panel_disable(&panel->base);
...@@ -277,7 +277,7 @@ static int seiko_panel_remove(struct platform_device *pdev) ...@@ -277,7 +277,7 @@ static int seiko_panel_remove(struct platform_device *pdev)
static void seiko_panel_shutdown(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); drm_panel_disable(&panel->base);
} }
......
...@@ -4800,7 +4800,7 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) ...@@ -4800,7 +4800,7 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
err = mipi_dsi_attach(dsi); err = mipi_dsi_attach(dsi);
if (err) { 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); drm_panel_remove(&panel->base);
} }
......
...@@ -725,7 +725,7 @@ static int rockchip_lvds_probe(struct platform_device *pdev) ...@@ -725,7 +725,7 @@ static int rockchip_lvds_probe(struct platform_device *pdev)
static int rockchip_lvds_remove(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); component_del(&pdev->dev, &rockchip_lvds_component_ops);
clk_unprepare(lvds->pclk); clk_unprepare(lvds->pclk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment