From: Abhishek Rajput <abhiraj21put@gmail.com>
To: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
alexander.deucher@amd.com, jeff.hugo@oss.qualcomm.com,
jani.nikula@intel.com, contact@emersion.fr,
lucas.demarchi@intel.com
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
abhiraj21put@gmail.com
Subject: [PATCH] drm/tiny: ili9163: Use dev_err_probe() instead of DRM_DEV_ERROR() during probing
Date: Tue, 18 Nov 2025 15:18:15 +0530 [thread overview]
Message-ID: <20251118094815.243962-1-abhiraj21put@gmail.com> (raw)
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
reply other threads:[~2025-11-18 9:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251118094815.243962-1-abhiraj21put@gmail.com \
--to=abhiraj21put@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=contact@emersion.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®