[PATCH v1 06/19] drm/panel: sitronix: use DRM_DEV*
Sam Ravnborg
sam at ravnborg.org
Thu Jan 31 19:26:06 UTC 2019
Introduce use of DRM_DEV* for logging.
This makes logging in the drm subsystem more consistent.
Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
Cc: Thierry Reding <thierry.reding at gmail.com>
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel at ffwll.ch>
---
drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index 76bd6e7a1a60..f649fe5cc364 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -16,6 +16,7 @@
#include <drm/drm_device.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
+#include <drm/drm_print.h>
#include <video/mipi_display.h>
@@ -180,9 +181,10 @@ static int st7789v_get_modes(struct drm_panel *panel)
mode = drm_mode_duplicate(panel->drm, &default_mode);
if (!mode) {
- dev_err(panel->drm->dev, "failed to add mode %ux%ux@%u\n",
- default_mode.hdisplay, default_mode.vdisplay,
- default_mode.vrefresh);
+ DRM_DEV_ERROR(panel->drm->dev,
+ "failed to add mode %ux%ux@%u\n",
+ default_mode.hdisplay, default_mode.vdisplay,
+ default_mode.vrefresh);
return -ENOMEM;
}
@@ -393,7 +395,7 @@ static int st7789v_probe(struct spi_device *spi)
ctx->reset = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ctx->reset)) {
- dev_err(&spi->dev, "Couldn't get our reset line\n");
+ DRM_DEV_ERROR(&spi->dev, "Couldn't get our reset line\n");
return PTR_ERR(ctx->reset);
}
--
2.12.0
More information about the dri-devel
mailing list