Skip to contentSkip to conversation

drm/panel: simple: Skip error message on deferred probe

PATCH Applied Fabio Estevam 2 participants 2 messages Jun 30, 2017 – Aug 18, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: simple: Skip error message on deferred probe

From: Fabio Estevam <[email protected]>

When enable_gpio is provided via an I2C or SPI expander, it may not be available when panel-simple probes leading to the following error:

panel-simple panel: failed to request GPIO: -517

As this error message is not very useful to the end user, skip printing it in the case of deferred probe.

---
 drivers/gpu/drm/panel/panel-simple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-simple.c +2 -1
index 474fa75..9469c4d 100644
@@ -315,7 +315,8 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 						     GPIOD_OUT_LOW);
 	if (IS_ERR(panel->enable_gpio)) {
 		err = PTR_ERR(panel->enable_gpio);
-		dev_err(dev, "failed to request GPIO: %d\n", err);
+		if (err != -EPROBE_DEFER)
+			dev_err(dev, "failed to request GPIO: %d\n", err);
 		return err;
 	}
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

When enable_gpio is provided via an I2C or SPI expander, it may not be available when panel-simple probes leading to the following error:

panel-simple panel: failed to request GPIO: -517

Quoted 7 lines

As this error message is not very useful to the end user, skip printing it in the case of deferred probe.

---
 drivers/gpu/drm/panel/panel-simple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to drm-misc-next, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel