Introduce use of DRM_DEV* for logging. This makes logging in the drm subsystem more consistent. Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx> Cc: Thierry Reding <thierry.reding@xxxxxxxxx> Cc: David Airlie <airlied@xxxxxxxx> Cc: Daniel Vetter <daniel@xxxxxxxx> --- drivers/gpu/drm/panel/panel-simple.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 406b1d7aef31..a5d98a19f138 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -33,6 +33,7 @@ #include <drm/drm_device.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_panel.h> +#include <drm/drm_print.h> #include <video/display_timing.h> #include <video/videomode.h> @@ -103,6 +104,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) { struct drm_connector *connector = panel->base.connector; struct drm_device *drm = panel->base.drm; + struct device *dev = drm->dev; struct drm_display_mode *mode; unsigned int i, num = 0; @@ -116,8 +118,8 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) videomode_from_timing(dt, &vm); mode = drm_mode_create(drm); if (!mode) { - dev_err(drm->dev, "failed to add mode %ux%u\n", - dt->hactive.typ, dt->vactive.typ); + DRM_DEV_ERROR(dev, "failed to add mode %ux%u\n", + dt->hactive.typ, dt->vactive.typ); continue; } @@ -137,8 +139,8 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) mode = drm_mode_duplicate(drm, m); if (!mode) { - dev_err(drm->dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + DRM_DEV_ERROR(dev, "failed to add mode %ux%u@%u\n", + m->hdisplay, m->vdisplay, m->vrefresh); continue; } @@ -215,7 +217,8 @@ static int panel_simple_prepare(struct drm_panel *panel) err = regulator_enable(p->supply); if (err < 0) { - dev_err(panel->dev, "failed to enable supply: %d\n", err); + DRM_DEV_ERROR(panel->dev, "failed to enable supply: %d\n", + err); return err; } @@ -325,7 +328,8 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) if (IS_ERR(panel->enable_gpio)) { err = PTR_ERR(panel->enable_gpio); if (err != -EPROBE_DEFER) - dev_err(dev, "failed to request GPIO: %d\n", err); + DRM_DEV_ERROR(dev, "failed to request GPIO: %d\n", + err); return err; } @@ -3048,7 +3052,8 @@ static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) err = mipi_dsi_detach(dsi); if (err < 0) - dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); + DRM_DEV_ERROR(&dsi->dev, + "failed to detach from DSI host: %d\n", err); return panel_simple_remove(&dsi->dev); } -- 2.12.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel