From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757003AbcBSK2A (ORCPT ); Fri, 19 Feb 2016 05:28:00 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:58279 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbcBSK15 (ORCPT ); Fri, 19 Feb 2016 05:27:57 -0500 From: Rabin Vincent To: lgirdwood@gmail.com, broonie@kernel.org Cc: linux-kernel@vger.kernel.org, Rabin Vincent Subject: [PATCH] regulator: gpio: don't print error on EPROBE_DEFER Date: Fri, 19 Feb 2016 11:27:53 +0100 Message-Id: <1455877673-19307-1-git-send-email-rabin.vincent@axis.com> X-Mailer: git-send-email 2.7.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't print out an error with the driver sees EPROBE_DEFER when attempting to get the gpio. These errors are usually transient; the probe will be retried later. Signed-off-by: Rabin Vincent --- drivers/regulator/gpio-regulator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 7bba8b7..a8718e9 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -283,8 +283,10 @@ static int gpio_regulator_probe(struct platform_device *pdev) drvdata->nr_gpios = config->nr_gpios; ret = gpio_request_array(drvdata->gpios, drvdata->nr_gpios); if (ret) { - dev_err(&pdev->dev, - "Could not obtain regulator setting GPIOs: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, + "Could not obtain regulator setting GPIOs: %d\n", + ret); goto err_memstate; } } -- 2.7.0