[PATCH] drm/panel: s6e63m0: Fix up DRM_DEV* regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ooops the panel drivers stopped to use DRM_DEV* messages
and we predictably create errors by merging code that
still use it.

Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
 .../gpu/drm/panel/panel-samsung-s6e63m0-dsi.c | 28 +++++++++----------
 .../gpu/drm/panel/panel-samsung-s6e63m0-spi.c |  8 +++---
 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 18 ++++++------
 3 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c
index 2ec9e7900791..6eca6f4c0e99 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c
@@ -23,11 +23,11 @@ static int s6e63m0_dsi_dcs_read(struct device *dev, const u8 cmd, u8 *data)
 
 	ret = mipi_dsi_dcs_read(dsi, cmd, data, 1);
 	if (ret < 0) {
-		DRM_DEV_ERROR(dev, "could not read DCS CMD %02x\n", cmd);
+		dev_err(dev, "could not read DCS CMD %02x\n", cmd);
 		return ret;
 	}
 
-	DRM_DEV_INFO(dev, "DSI read CMD %02x = %02x\n", cmd, *data);
+	dev_info(dev, "DSI read CMD %02x = %02x\n", cmd, *data);
 
 	return 0;
 }
@@ -42,7 +42,7 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
 	int chunk;
 	int ret;
 
-	DRM_DEV_INFO(dev, "DSI writing dcs seq: %*ph\n", (int)len, data);
+	dev_info(dev, "DSI writing dcs seq: %*ph\n", (int)len, data);
 
 	/* Pick out and skip past the DCS command */
 	cmd = *seqp;
@@ -56,9 +56,9 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
 		chunk = S6E63M0_DSI_MAX_CHUNK;
 	ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk);
 	if (ret < 0) {
-		DRM_DEV_ERROR(dev,
-			      "error sending DCS command seq cmd %02x\n",
-			      cmd);
+		dev_err(dev,
+			"error sending DCS command seq cmd %02x\n",
+			cmd);
 		return ret;
 	}
 	cmdwritten += chunk;
@@ -70,23 +70,23 @@ static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
 			chunk = S6E63M0_DSI_MAX_CHUNK;
 		ret = mipi_dsi_dcs_write(dsi, MCS_GLOBAL_PARAM, &cmdwritten, 1);
 		if (ret < 0) {
-			DRM_DEV_ERROR(dev,
-				      "error sending CMD %02x global param %02x\n",
-				      cmd, cmdwritten);
+			dev_err(dev,
+				"error sending CMD %02x global param %02x\n",
+				cmd, cmdwritten);
 			return ret;
 		}
 		ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk);
 		if (ret < 0) {
-			DRM_DEV_ERROR(dev,
-				      "error sending CMD %02x chunk\n",
-				      cmd);
+			dev_err(dev,
+				"error sending CMD %02x chunk\n",
+				cmd);
 			return ret;
 		}
 		cmdwritten += chunk;
 		seqp += chunk;
 	}
-	DRM_DEV_INFO(dev, "sent command %02x %02x bytes\n",
-		     cmd, cmdwritten);
+	dev_info(dev, "sent command %02x %02x bytes\n",
+		 cmd, cmdwritten);
 
 	usleep_range(8000, 9000);
 
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c
index 3b1a2a3a44ea..d298d780220d 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c
@@ -41,7 +41,7 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len)
 {
 	int ret = 0;
 
-	DRM_DEV_DEBUG(dev, "SPI writing dcs seq: %*ph\n", (int)len, data);
+	dev_dbg(dev, "SPI writing dcs seq: %*ph\n", (int)len, data);
 	ret = s6e63m0_spi_write_word(dev, *data);
 
 	while (!ret && --len) {
@@ -50,8 +50,8 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len)
 	}
 
 	if (ret) {
-		DRM_DEV_ERROR(dev, "SPI error %d writing dcs seq: %*ph\n", ret,
-			      (int)len, data);
+		dev_err(dev, "SPI error %d writing dcs seq: %*ph\n", ret,
+			(int)len, data);
 	}
 
 	usleep_range(300, 310);
@@ -68,7 +68,7 @@ static int s6e63m0_spi_probe(struct spi_device *spi)
 	spi->mode = SPI_MODE_3;
 	ret = spi_setup(spi);
 	if (ret < 0) {
-		DRM_DEV_ERROR(dev, "spi setup failed.\n");
+		dev_err(dev, "spi setup failed.\n");
 		return ret;
 	}
 	return s6e63m0_probe(dev, s6e63m0_spi_dcs_read, s6e63m0_spi_dcs_write,
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
index c9472b2ae0cd..7f2fd5516958 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
@@ -179,28 +179,28 @@ static int s6e63m0_check_lcd_type(struct s6e63m0 *ctx)
 
 	ret = s6e63m0_clear_error(ctx);
 	if (ret) {
-		DRM_DEV_ERROR(ctx->dev, "error checking LCD type (%d)\n",
-			      ret);
+		dev_err(ctx->dev, "error checking LCD type (%d)\n",
+			ret);
 		ctx->lcd_type = 0x00;
 		return ret;
 	}
 
-	DRM_DEV_INFO(ctx->dev, "MTP ID: %02x %02x %02x\n", id1, id2, id3);
+	dev_info(ctx->dev, "MTP ID: %02x %02x %02x\n", id1, id2, id3);
 
 	/* We attempt to detect what panel is mounted on the controller */
 	switch (id2) {
 	case S6E63M0_LCD_ID_VALUE_M2:
-		DRM_DEV_INFO(ctx->dev,
-			     "detected LCD panel AMS397GE MIPI M2\n");
+		dev_info(ctx->dev,
+			 "detected LCD panel AMS397GE MIPI M2\n");
 		break;
 	case S6E63M0_LCD_ID_VALUE_SM2:
 	case S6E63M0_LCD_ID_VALUE_SM2_1:
-		DRM_DEV_INFO(ctx->dev,
-			     "detected LCD panel AMS397GE MIPI SM2\n");
+		dev_info(ctx->dev,
+			 "detected LCD panel AMS397GE MIPI SM2\n");
 		break;
 	default:
-		DRM_DEV_INFO(ctx->dev,
-			     "unknown LCD panel type %02x\n", id2);
+		dev_info(ctx->dev,
+			 "unknown LCD panel type %02x\n", id2);
 		break;
 	}
 
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux