[PATCH v1 11/19] drm/panel: lvds: use DRM_DEV*

Sam Ravnborg
2019-01-31T19:26:51Z

drivers/gpu/drm/panel/panel-lvds.c | 38 ++++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index 833aeb47065b..2aa0555f78ac 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -18,6 +18,7 @@

#include <drm/drm_crtc.h>
#include <drm/drm_panel.h>
+#include <drm/drm_print.h>

#include <video/display_timing.h>
#include <video/of_display_timing.h>
@@ -81,8 +82,8 @@ static int panel_lvds_prepare(struct drm_panel *panel)

err = regulator_enable(lvds->supply);
if (err < 0) {
- dev_err(lvds->dev, "failed to enable supply: %d\n",
- err);
+ DRM_DEV_ERROR(lvds->dev,
+ "failed to enable supply: %d\n", err);
return err;
}
}
@@ -154,14 +155,16 @@ static int panel_lvds_parse_dt(struct panel_lvds *lvds)

ret = of_property_read_u32(np, "width-mm", &lvds->width);
if (ret < 0) {
- dev_err(lvds->dev, "%pOF: invalid or missing %s DT property\n",
- np, "width-mm");
+ DRM_DEV_ERROR(lvds->dev,
+ "%pOF: invalid or missing %s DT property\n",
+ np, "width-mm");
return -ENODEV;
}
ret = of_property_read_u32(np, "height-mm", &lvds->height);
if (ret < 0) {
- dev_err(lvds->dev, "%pOF: invalid or missing %s DT property\n",
- np, "height-mm");
+ DRM_DEV_ERROR(lvds->dev,
+ "%pOF: invalid or missing %s DT property\n",
+ np, "height-mm");
return -ENODEV;
}

@@ -169,8 +172,9 @@ static int panel_lvds_parse_dt(struct panel_lvds *lvds)

ret = of_property_read_string(np, "data-mapping", &mapping);
if (ret < 0) {
- dev_err(lvds->dev, "%pOF: invalid or missing %s DT property\n",
- np, "data-mapping");
+ DRM_DEV_ERROR(lvds->dev,
+ "%pOF: invalid or missing %s DT property\n",
+ np, "data-mapping");
return -ENODEV;
}

@@ -181,8 +185,9 @@ static int panel_lvds_parse_dt(struct panel_lvds *lvds)
} else if (!strcmp(mapping, "vesa-24")) {
lvds->bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG;
} else {
- dev_err(lvds->dev, "%pOF: invalid or missing %s DT property\n",
- np, "data-mapping");
+ DRM_DEV_ERROR(lvds->dev,
+ "%pOF: invalid or missing %s DT property\n",
+ np, "data-mapping");
return -EINVAL;
}

@@ -213,8 +218,9 @@ static int panel_lvds_probe(struct platform_device *pdev)

if (ret != -ENODEV) {
if (ret != -EPROBE_DEFER)
- dev_err(lvds->dev, "failed to request regulator: %d\n",
- ret);
+ DRM_DEV_ERROR(lvds->dev,
+ "failed to request regulator: %d\n",
+ ret);
return ret;
}

@@ -226,8 +232,8 @@ static int panel_lvds_probe(struct platform_device *pdev)
GPIOD_OUT_LOW);
if (IS_ERR(lvds->enable_gpio)) {
ret = PTR_ERR(lvds->enable_gpio);
- dev_err(lvds->dev, "failed to request %s GPIO: %d\n",
- "enable", ret);
+ DRM_DEV_ERROR(lvds->dev, "failed to request %s GPIO: %d\n",
+ "enable", ret);
return ret;
}

@@ -235,8 +241,8 @@ static int panel_lvds_probe(struct platform_device *pdev)
GPIOD_OUT_HIGH);
if (IS_ERR(lvds->reset_gpio)) {
ret = PTR_ERR(lvds->reset_gpio);
- dev_err(lvds->dev, "failed to request %s GPIO: %d\n",
- "reset", ret);
+ DRM_DEV_ERROR(lvds->dev, "failed to request %s GPIO: %d\n",
+ "reset", ret);
return ret;
}

--
2.12.0