From patchwork Sun Mar 8 21:51:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 212640 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6DE3C10DCE for ; Sun, 8 Mar 2020 21:52:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 884B32072A for ; Sun, 8 Mar 2020 21:52:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MLC8yrSn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbgCHVwt (ORCPT ); Sun, 8 Mar 2020 17:52:49 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42199 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbgCHVws (ORCPT ); Sun, 8 Mar 2020 17:52:48 -0400 Received: by mail-lf1-f67.google.com with SMTP id t21so6031986lfe.9; Sun, 08 Mar 2020 14:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UfPInF29HyA+ns2MPE9iODlTeIAJJSC5Tqib3KT01eM=; b=MLC8yrSnJQEZ/PT1RSVAxboE1gfXel4xvUY7foQIRA7mC9QC3k8ty525GvFN8YrYJB +iGtnyky/puZI+uJcT6bWLlkk0Hi9UmRkxuwtT8eci/1rP9bRzKFR6I8AVluhrqZYnp0 wj6k3wMF8ajc/f916NJ6G3H5RUj+g3l1tDZK7rBlygw2LwdhtI+WmOpYJusgHRa11EJ8 VzxIxD+zJcYhcq4mxB9Mb4K4e91K1DeKyrZ8eJpVJCX1+9p2qYLzSqde9EqURNWABrNG 6RKGFdqw2hLlGkIIGV0gmM6KfwlqXQRMz5GIznXvcDkvEWHPcqTuh3jx5rE5Q9t3kpWD 5AoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UfPInF29HyA+ns2MPE9iODlTeIAJJSC5Tqib3KT01eM=; b=MYPTMKKqZ5ezTwQ3rJmTHIaC4LLhEJwe+QJOYVesZv6vrUpAn0niAjUcrO+QBt6CNI VaShhwZBwxBB8W5xGGRnAqqHR0W7f87dMPopqq+zoApNeCu2porWgBAoqFq+4m6D+19R DOTbly3wJYM5C8Z9C0xk5ptBPCZfUTNdmrFqcc22By3RGsO28zHnAl5mJQ5i0bwk5Wb2 uryoJKGrEnBWPblCF81qM08QojqDCL0aW9P+xwZdqzh9XuZTz3j58YJ3lGYJIkWwWFKm 1U9ihPFGzh+3Y5GR3cw99Mn4K+WVsiepupb1/GD2sU/c+N1Hetj119pSSKCeQd71fiUI 5QfQ== X-Gm-Message-State: ANhLgQ03yBiM2Y8GWyPpPUpOn/D/ry3q0iIZkLHWXPrLliEJAGbqJ1d0 Ih35ERmQ336yWzLBc61xRY0= X-Google-Smtp-Source: ADFU+vs4ORZYGJJG2HHeQFEH4DyLn8GTv8J+rLm2mAC6rJn8Whn+qjkuzVXKrAk47AiglMi9qUERTg== X-Received: by 2002:ac2:4a84:: with SMTP id l4mr7452588lfp.217.1583704366401; Sun, 08 Mar 2020 14:52:46 -0700 (PDT) Received: from localhost.localdomain (94-29-39-224.dynamic.spd-mgts.ru. [94.29.39.224]) by smtp.gmail.com with ESMTPSA id x11sm19001540ljj.47.2020.03.08.14.52.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Mar 2020 14:52:45 -0700 (PDT) From: Dmitry Osipenko To: "Andrew F. Davis" , =?utf-8?q?Pali_Roh=C3=A1r?= , Sebastian Reichel , David Heidelberg Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] power: supply: bq27xxx_battery: Silence deferred-probe error Date: Mon, 9 Mar 2020 00:51:43 +0300 Message-Id: <20200308215143.27823-1-digetx@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- 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); }