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-16-sam@ravnborg.org>
Date:   Thu, 31 Jan 2019 20:26:15 +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 15/19] drm/panel: raspberrypi: 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>
---
 .../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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ