public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	David Lechner <david@lechnology.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH] gpiolib: suppress error message on EPROBE_DEFER
Date: Sun, 21 Jan 2018 14:32:54 -0600	[thread overview]
Message-ID: <1516566774-1786-1-git-send-email-david@lechnology.com> (raw)

This suppresses printing an error message during probe of gpio drivers
when the error is EPROBE_DEFER.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David Lechner <david@lechnology.com>
---
 drivers/gpio/gpiolib.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 44332b7..134d0e4 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1289,9 +1289,10 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
 err_free_gdev:
 	ida_simple_remove(&gpio_ida, gdev->id);
 	/* failures here can mean systems won't boot... */
-	pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__,
-	       gdev->base, gdev->base + gdev->ngpio - 1,
-	       chip->label ? : "generic");
+	if (status != -EPROBE_DEFER)
+		pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__,
+		       gdev->base, gdev->base + gdev->ngpio - 1,
+		       chip->label ? : "generic");
 	kfree(gdev);
 	return status;
 }
-- 
2.7.4

             reply	other threads:[~2018-01-21 20:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 20:32 David Lechner [this message]
2018-02-07 12:57 ` [PATCH] gpiolib: suppress error message on EPROBE_DEFER Linus Walleij
2018-02-08 18:18   ` Grygorii Strashko
2018-02-18  3:47   ` David Lechner
2018-02-22 15:00     ` Linus Walleij

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=1516566774-1786-1-git-send-email-david@lechnology.com \
    --to=david@lechnology.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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