linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew F. Davis" <afd@ti.com>
To: "Dmitry Osipenko" <digetx@gmail.com>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"David Heidelberg" <david@ixit.cz>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] power: supply: bq27xxx_battery: Silence deferred-probe error
Date: Mon, 9 Mar 2020 08:51:58 -0400	[thread overview]
Message-ID: <7493a430-905e-baf4-1265-a6b3eb31f79f@ti.com> (raw)
In-Reply-To: <20200308215143.27823-1-digetx@gmail.com>

On 3/8/20 5:51 PM, Dmitry Osipenko wrote:
> The driver fails to probe with -EPROBE_DEFER if battery's power supply
> (charger driver) isn't ready yet and this results in a bit noisy error
> message in KMSG during kernel's boot up. Let's silence the harmless
> error message.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---


Reviewed-by: Andrew F. Davis <afd@ti.com>


>  drivers/power/supply/bq27xxx_battery.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index 195c18c2f426..664e50103eaa 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -1885,7 +1885,10 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di)
>  
>  	di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
>  	if (IS_ERR(di->bat)) {
> -		dev_err(di->dev, "failed to register battery\n");
> +		if (PTR_ERR(di->bat) == -EPROBE_DEFER)
> +			dev_dbg(di->dev, "failed to register battery, deferring probe\n");
> +		else
> +			dev_err(di->dev, "failed to register battery\n");
>  		return PTR_ERR(di->bat);
>  	}
>  
> 

  reply	other threads:[~2020-03-09 12:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 21:51 [PATCH v1] power: supply: bq27xxx_battery: Silence deferred-probe error Dmitry Osipenko
2020-03-09 12:51 ` Andrew F. Davis [this message]
2020-03-09 23:06 ` Pali Rohár
2020-03-10 13:21   ` Dmitry Osipenko
2020-03-11 22:14 ` Sebastian Reichel

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=7493a430-905e-baf4-1265-a6b3eb31f79f@ti.com \
    --to=afd@ti.com \
    --cc=david@ixit.cz \
    --cc=digetx@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=sre@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).