diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-08-20 14:12:56 +0200 |
---|---|---|
committer | Paul Cercueil <paul@crapouillou.net> | 2020-08-20 18:34:42 +0200 |
commit | d738005da9c59e57e5700ccf6f505c9569c93da1 (patch) | |
tree | 84463fdc2b4b2c66bd348844f780aa7beea42e27 /drivers/gpu/drm/panel/panel-novatek-nt39016.c | |
parent | drm/panel: novatek,nt39016: Reorder calls in probe (diff) | |
download | linux-d738005da9c59e57e5700ccf6f505c9569c93da1.tar.xz linux-d738005da9c59e57e5700ccf6f505c9569c93da1.zip |
drm/panel: novatek,nt39016: Remove 'dev' field in priv struct
There is already a 'struct device' pointer in the drm_panel structure,
that we can access easily from our priv structure, so there's no need
for a separate 'dev' field there.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200820121256.32037-3-paul@crapouillou.net
Diffstat (limited to 'drivers/gpu/drm/panel/panel-novatek-nt39016.c')
-rw-r--r-- | drivers/gpu/drm/panel/panel-novatek-nt39016.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt39016.c b/drivers/gpu/drm/panel/panel-novatek-nt39016.c index daa583030246..f8151fe3ac9a 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt39016.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt39016.c @@ -56,7 +56,6 @@ struct nt39016_panel_info { struct nt39016 { struct drm_panel drm_panel; - struct device *dev; struct regmap *map; struct regulator *supply; const struct nt39016_panel_info *panel_info; @@ -124,7 +123,7 @@ static int nt39016_prepare(struct drm_panel *drm_panel) err = regulator_enable(panel->supply); if (err) { - dev_err(panel->dev, "Failed to enable power supply: %d\n", err); + dev_err(drm_panel->dev, "Failed to enable power supply: %d\n", err); return err; } @@ -143,7 +142,7 @@ static int nt39016_prepare(struct drm_panel *drm_panel) err = regmap_multi_reg_write(panel->map, nt39016_panel_regs, ARRAY_SIZE(nt39016_panel_regs)); if (err) { - dev_err(panel->dev, "Failed to init registers: %d\n", err); + dev_err(drm_panel->dev, "Failed to init registers: %d\n", err); goto err_disable_regulator; } @@ -173,7 +172,7 @@ static int nt39016_enable(struct drm_panel *drm_panel) ret = regmap_write(panel->map, NT39016_REG_SYSTEM, NT39016_SYSTEM_RESET_N | NT39016_SYSTEM_STANDBY); if (ret) { - dev_err(panel->dev, "Unable to enable panel: %d\n", ret); + dev_err(drm_panel->dev, "Unable to enable panel: %d\n", ret); return ret; } @@ -193,7 +192,7 @@ static int nt39016_disable(struct drm_panel *drm_panel) err = regmap_write(panel->map, NT39016_REG_SYSTEM, NT39016_SYSTEM_RESET_N); if (err) { - dev_err(panel->dev, "Unable to disable panel: %d\n", err); + dev_err(drm_panel->dev, "Unable to disable panel: %d\n", err); return err; } @@ -252,7 +251,6 @@ static int nt39016_probe(struct spi_device *spi) if (!panel) return -ENOMEM; - panel->dev = dev; spi_set_drvdata(spi, panel); panel->panel_info = of_device_get_match_data(dev); |