@@ -366,8 +366,7 @@ static int panel_simple_unprepare(struct drm_panel *panel)
return 0;
}
-static int panel_simple_get_hpd_gpio(struct device *dev,
- struct panel_simple *p, bool from_probe)
+static int panel_simple_get_hpd_gpio(struct device *dev, struct panel_simple *p)
{
int err;
@@ -375,17 +374,10 @@ static int panel_simple_get_hpd_gpio(struct device *dev,
if (IS_ERR(p->hpd_gpio)) {
err = PTR_ERR(p->hpd_gpio);
- /*
- * If we're called from probe we won't consider '-EPROBE_DEFER'
- * to be an error--we'll leave the error code in "hpd_gpio".
- * When we try to use it we'll try again. This allows for
- * circular dependencies where the component providing the
- * hpd gpio needs the panel to init before probing.
- */
- if (err != -EPROBE_DEFER || !from_probe) {
+ if (err != -EPROBE_DEFER)
dev_err(dev, "failed to get 'hpd' GPIO: %d\n", err);
- return err;
- }
+
+ return err;
}
return 0;
@@ -416,12 +408,6 @@ static int panel_simple_prepare_once(struct panel_simple *p)
msleep(delay);
if (p->hpd_gpio) {
- if (IS_ERR(p->hpd_gpio)) {
- err = panel_simple_get_hpd_gpio(dev, p, false);
- if (err)
- goto error;
- }
-
if (p->desc->delay.hpd_absent_delay)
hpd_wait_us = p->desc->delay.hpd_absent_delay * 1000UL;
else
@@ -682,7 +668,7 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd");
if (!panel->no_hpd) {
- err = panel_simple_get_hpd_gpio(dev, panel, true);
+ err = panel_simple_get_hpd_gpio(dev, panel);
if (err)
return err;
}