linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ray Jui <rjui@broadcom.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com, Keerthy <j-keerthy@ti.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 2/6] gpio: davinci: Simplify with dev_err_probe()
Date: Thu, 27 Aug 2020 22:08:23 +0200	[thread overview]
Message-ID: <20200827200827.26462-2-krzk@kernel.org> (raw)
In-Reply-To: <20200827200827.26462-1-krzk@kernel.org>

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/gpio/gpio-davinci.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 085b874db2a9..6f2138503726 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -237,12 +237,8 @@ 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) {
-			if (chips->irqs[i] != -EPROBE_DEFER)
-				dev_info(dev, "IRQ not populated, err = %d\n",
-					 chips->irqs[i]);
-			return chips->irqs[i];
-		}
+		if (chips->irqs[i] < 0)
+			return dev_err_probe(dev, chips->irqs[i], "IRQ not populated\n");
 	}
 
 	chips->chip.label = dev_name(dev);
-- 
2.17.1


  reply	other threads:[~2020-08-27 20:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 20:08 [PATCH 1/6] gpio: bcm-kona: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-08-27 20:08 ` Krzysztof Kozlowski [this message]
2020-08-27 20:08 ` [PATCH 3/6] gpio: omap: " Krzysztof Kozlowski
2020-08-28  8:01   ` Grygorii Strashko
2020-08-27 20:08 ` [PATCH 4/6] gpio: pca953x: " Krzysztof Kozlowski
2020-08-27 20:08 ` [PATCH 5/6] gpio: pisosr: " Krzysztof Kozlowski
2020-08-27 20:08 ` [PATCH 6/6] gpio: zynq: " Krzysztof Kozlowski
2020-08-28  5:20   ` Michal Simek
2020-09-12  9:26   ` Linus Walleij
2020-08-28 10:03 ` [PATCH 1/6] gpio: bcm-kona: " Andy Shevchenko
2020-08-28 17:15 ` Florian Fainelli
2020-08-28 18:17 ` Bartosz Golaszewski
2020-09-12  9:27   ` 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=20200827200827.26462-2-krzk@kernel.org \
    --to=krzk@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=f.fainelli@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=ssantosh@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;
as well as URLs for NNTP newsgroup(s).