lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190131192619.9763-12-sam@ravnborg.org>
Date:   Thu, 31 Jan 2019 20:26:11 +0100
From:   Sam Ravnborg <sam@...nborg.org>
To:     Thierry Reding <thierry.reding@...il.com>,
        dri-devel@...ts.freedesktop.org
Cc:     Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...ux.ie>,
        Linus Walleij <linus.walleij@...aro.org>,
        Stefan Mavrodiev <stefan@...mex.com>,
        linux-kernel@...r.kernel.org, Sam Ravnborg <sam@...nborg.org>
Subject: [PATCH v1 11/19] drm/panel: lvds: use DRM_DEV*

Introduce use of DRM_DEV* for logging.
This makes logging in the drm subsystem more consistent.

Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Cc: Thierry Reding <thierry.reding@...il.com>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ