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> --- .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 28c0620dfe0f..c9013faff9ed 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -57,6 +57,7 @@ #include <drm/drm_device.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_panel.h> +#include <drm/drm_print.h> #define RPI_DSI_DRIVER_NAME "rpi-ts-dsi" @@ -232,7 +233,7 @@ static void rpi_touchscreen_i2c_write(struct rpi_touchscreen *ts, ret = i2c_smbus_write_byte_data(ts->i2c, reg, val); if (ret) - dev_err(&ts->dsi->dev, "I2C write failed: %d\n", ret); + DRM_DEV_ERROR(&ts->dsi->dev, "I2C write failed: %d\n", ret); } static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val) @@ -324,8 +325,9 @@ static int rpi_touchscreen_get_modes(struct drm_panel *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(drm->dev, + "failed to add mode %ux%u@%u\n", + m->hdisplay, m->vdisplay, m->vrefresh); continue; } @@ -381,7 +383,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, ver = rpi_touchscreen_i2c_read(ts, REG_ID); if (ver < 0) { - dev_err(dev, "Atmel I2C read failed: %d\n", ver); + DRM_DEV_ERROR(dev, "Atmel I2C read failed: %d\n", ver); return -ENODEV; } @@ -390,7 +392,9 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, case 0xc3: /* ver 2 */ break; default: - dev_err(dev, "Unknown Atmel firmware revision: 0x%02x\n", ver); + DRM_DEV_ERROR(dev, + "Unknown Atmel firmware revision: 0x%02x\n", + ver); return -ENODEV; } @@ -412,8 +416,9 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, ts->dsi = mipi_dsi_device_register_full(host, &info); if (IS_ERR(ts->dsi)) { - dev_err(dev, "DSI device registration failed: %ld\n", - PTR_ERR(ts->dsi)); + DRM_DEV_ERROR(dev, + "DSI device registration failed: %ld\n", + PTR_ERR(ts->dsi)); return PTR_ERR(ts->dsi); } @@ -457,7 +462,8 @@ static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi) ret = mipi_dsi_attach(dsi); if (ret) - dev_err(&dsi->dev, "failed to attach dsi to host: %d\n", ret); + DRM_DEV_ERROR(&dsi->dev, + "failed to attach dsi to host: %d\n", ret); return ret; } -- 2.12.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel