mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/tiny: ili9163: Use dev_err_probe() instead of DRM_DEV_ERROR() during probing
@ 2025-11-18  9:48 Abhishek Rajput
  0 siblings, 0 replies; only message in thread
From: Abhishek Rajput @ 2025-11-18  9:48 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, simona,
	alexander.deucher, jeff.hugo, jani.nikula, contact,
	lucas.demarchi
  Cc: dri-devel, linux-kernel, abhiraj21put

The DRM_DEV_ERROR() macro has been deprecated, and using
dev_err_probe() is preferred. In addition, dev_err_probe() helps
avoid unexpected repeated error logs during deferred probing.

Signed-off-by: Abhishek Rajput <abhiraj21put@gmail.com>

diff --git a/drivers/gpu/drm/tiny/ili9163.c b/drivers/gpu/drm/tiny/ili9163.c
index 62cadf5e033d..22028c7a1ea1 100644
--- a/drivers/gpu/drm/tiny/ili9163.c
+++ b/drivers/gpu/drm/tiny/ili9163.c
@@ -155,16 +155,14 @@ static int ili9163_probe(struct spi_device *spi)
 	spi_set_drvdata(spi, drm);
 
 	dbi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
-	if (IS_ERR(dbi->reset)) {
-		DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n");
-		return PTR_ERR(dbi->reset);
-	}
+	if (IS_ERR(dbi->reset))
+		return dev_err_probe(dev, PTR_ERR(dbi->reset),
+				"Failed to get gpio 'reset'\n");
 
 	dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW);
-	if (IS_ERR(dc)) {
-		DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n");
-		return PTR_ERR(dc);
-	}
+	if (IS_ERR(dc))
+		return dev_err_probe(dev, PTR_ERR(dc),
+				"Failed to get gpio 'dc'\n");
 
 	dbidev->backlight = devm_of_find_backlight(dev);
 	if (IS_ERR(dbidev->backlight))
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-18  9:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-18  9:48 [PATCH] drm/tiny: ili9163: Use dev_err_probe() instead of DRM_DEV_ERROR() during probing Abhishek Rajput

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®