Skip to contentSkip to conversation

gpio: davinci: silence error prints in case of EPROBE_DEFER

PATCH Applied Keerthy 2 participants 2 messages Jul 8, 2019

Subsystems (2)
lore
Share & tools
lore

Keerthy

author maintainer
#0 lore raw

PATCH 1/1 gpio: davinci: silence error prints in case of EPROBE_DEFER

Silence error prints in case of EPROBE_DEFER. This avoids multiple/duplicate defer prints during boot.

---
 drivers/gpio/gpio-davinci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpio/gpio-davinci.c +3 -2
index fc494a84a29d..e0b025689625 100644
@@ -238,8 +238,9 @@ static int davinci_gpio_probe(struct platform_device *pdev)
 	for (i = 0; i < nirq; i++) {
 		chips->irqs[i] = platform_get_irq(pdev, i);
 		if (chips->irqs[i] < 0) {
-			dev_info(dev, "IRQ not populated, err = %d\n",
-				 chips->irqs[i]);
+			if (chips->irqs[i] != -EPROBE_DEFER)
+				dev_info(dev, "IRQ not populated, err = %d\n",
+					 chips->irqs[i]);
 			return chips->irqs[i];
 		}
 	}
Signature · 1 line
2.17.1
#1 lore raw

pon., 8 lip 2019 o 10:48 Keerthy <[email protected]> napisał(a):

Quoted 26 lines

Silence error prints in case of EPROBE_DEFER. This avoids multiple/duplicate defer prints during boot.

---
 drivers/gpio/gpio-davinci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpio/gpio-davinci.c +3 -3
index fc494a84a29d..e0b025689625 100644
@@ -238,8 +238,9 @@ static int davinci_gpio_probe(struct platform_device *pdev)
        for (i = 0; i < nirq; i++) {
                chips->irqs[i] = platform_get_irq(pdev, i);
                if (chips->irqs[i] < 0) {
-                       dev_info(dev, "IRQ not populated, err = %d\n",
-                                chips->irqs[i]);
+                       if (chips->irqs[i] != -EPROBE_DEFER)
+                               dev_info(dev, "IRQ not populated, err = %d\n",
+                                        chips->irqs[i]);
                        return chips->irqs[i];
                }
        }
--
Quoted 2 lines

2.17.1

Applied to fixes, thanks.

Bart