@@ -18,6 +18,7 @@
#include <drm/drm_device.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
+#include <drm/drm_print.h>
#include <video/videomode.h>
#include <video/display_timing.h>
@@ -157,10 +158,11 @@ static int lcd_olinuxino_get_modes(struct drm_panel *panel)
mode = drm_mode_create(drm);
if (!mode) {
- dev_err(drm->dev, "failed to add mode %ux%u@%u\n",
- lcd_mode->hactive,
- lcd_mode->vactive,
- lcd_mode->refresh);
+ DRM_DEV_ERROR(drm->dev,
+ "failed to add mode %ux%u@%u\n",
+ lcd_mode->hactive,
+ lcd_mode->vactive,
+ lcd_mode->refresh);
continue;
}
@@ -242,7 +244,8 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
(u8 *)&lcd->eeprom + i);
mutex_unlock(&lcd->mutex);
if (ret < 0) {
- dev_err(dev, "error reading from device at %02x\n", i);
+ DRM_DEV_ERROR(dev,
+ "error reading from device at %02x\n", i);
return ret;
}
}
@@ -250,20 +253,21 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
/* Check configuration checksum */
checksum = ~crc32(~0, (u8 *)&lcd->eeprom, 252);
if (checksum != lcd->eeprom.checksum) {
- dev_err(dev, "configuration checksum does not match!\n");
+ DRM_DEV_ERROR(dev,
+ "configuration checksum does not match!\n");
return -EINVAL;
}
/* Check magic header */
if (lcd->eeprom.header != LCD_OLINUXINO_HEADER_MAGIC) {
- dev_err(dev, "magic header does not match\n");
+ DRM_DEV_ERROR(dev, "magic header does not match\n");
return -EINVAL;
}
- dev_info(dev, "Detected %s, Rev. %s, Serial: %08x\n",
- lcd->eeprom.info.name,
- lcd->eeprom.revision,
- lcd->eeprom.serial);
+ DRM_DEV_INFO(dev, "Detected %s, Rev. %s, Serial: %08x\n",
+ lcd->eeprom.info.name,
+ lcd->eeprom.revision,
+ lcd->eeprom.serial);
/*
* The eeprom can hold up to 4 modes.
Introduce use of DRM_DEV* for logging. This makes logging in the drm subsystem more consistent. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Stefan Mavrodiev <stefan@olimex.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> --- drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-)