From mboxrd@z Thu Jan 1 00:00:00 1970 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 AA716C55189 for ; Wed, 22 Apr 2020 10:35:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8AB1D20780 for ; Wed, 22 Apr 2020 10:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587551711; bh=u+ZK0QjmPA3ERKqb6bXhhJqFb/fnt7rrc/MvdpraFAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WGyaFmeC60oeIYebzCf2b69v4mnxN/TKC5kWctjANZ1BB/HYKcVXtL6W+i8lPRu9N YPhXqefGRZf1kqG8k5ohZjuE716hkWsM5pcBJYyl603dG2aSoWsDiPv92pRUKP95nn PCQ95cY7Z9gAEHF4SkyarsHKnkk/hlcbAm7F//7s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730371AbgDVKXl (ORCPT ); Wed, 22 Apr 2020 06:23:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:59770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730320AbgDVKXU (ORCPT ); Wed, 22 Apr 2020 06:23:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FEDC20780; Wed, 22 Apr 2020 10:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587551000; bh=u+ZK0QjmPA3ERKqb6bXhhJqFb/fnt7rrc/MvdpraFAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rXb59OwfYnfUttjCtfvBgYXiZxjkA83GKnFxb+gb4B0hvO71uKW94gYCZodBxv2uH /bMIiuFx7/MkrL+chNh62Pd6E5v6KPEZZ0HKsO8BfV7stv52LhYW0ZZoPNdZoc3bsg uyaw+zgAuMrqW9PNO1JT4bzOF58HCqvNFpJh0OCU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , "Andrew F. Davis" , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Sebastian Reichel , Sasha Levin Subject: [PATCH 5.6 059/166] power: supply: bq27xxx_battery: Silence deferred-probe error Date: Wed, 22 Apr 2020 11:56:26 +0200 Message-Id: <20200422095055.188150785@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200422095047.669225321@linuxfoundation.org> References: <20200422095047.669225321@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko [ Upstream commit 583b53ece0b0268c542a1eafadb62e3d4b0aab8c ] 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 Reviewed-by: Andrew F. Davis Reviewed-by: Pali Rohár Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- 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 195c18c2f426e..664e50103eaaf 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); } -- 2.20.1