Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6540571imu; Mon, 21 Jan 2019 10:39:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN5A38705x7iHBksn2P9qzkQwrXQyWV3RRYFmuQgI7HwJm/b6gRy6S7B+ZoDUmhVfX4iNrfN X-Received: by 2002:a62:6f88:: with SMTP id k130mr30541498pfc.234.1548095996239; Mon, 21 Jan 2019 10:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548095996; cv=none; d=google.com; s=arc-20160816; b=H3A68Zh6tEAYHJEcoGtf4pCTcXLsbtMv1cOc1ZVyWJ/OtrX6ksNI8TDPg+TWNvU7l+ YXqL0YDiJaSi4PgcziJlB6heSkR2dGD3NpIsrkEflOqS7qNqXK17qmBojRUU1AkroTrv X6V2BSsDtyVd96F8rv4+cLNA0L+gbiRgMOAhxjOpabzRG+KxaiBKedCVj1CC79aiynq0 vu0T8/5j2cWOW0hmroC+l3Smrp09M3aA6L1pgGJVlpXZaLFULc9lke0dq/e4YD3Tbvrk zNjNbpwMDuv4KC9ksuJN5osU324AGoqsC8AiSy92JLg801WZfdR2Hpy+F8He23cQMNy/ zqKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DvDjW2J5ri+L1/t5EFcSwU+ZHLISGJXvHZow6RDENGk=; b=gbo5/ZvS5F2Ue4cuDq9nuUipHcn4kcvUZtWnp/eymkBOEqGvcZ10DMMooEApHij7Ng LCoKtVc+2WNG3BFDEnn3R2oy+YMvOFlynwQu+BafFI0F2aDinVz+yl8u3GnN8bfMUWGE LDPxtTpnFx/t5FDeS2UVlrIm06yTeksGBlbzgZW9iLkJXpkuZbLxu7GKe8dVTrL+CPDH byTc31PU/wDU4NdWrPOcrcnpRcHxwJH00zKu1DTlHq1FvIchdp53P4UO9Ytclp+gsHO1 /5BYPtETNfQ1G1CpQlm/wMyR0NJ9zJjDQlsDB1myEQAeSEB9IJeoAaDLa90JPWTivQIc 7Yfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=UaRqvkoN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si12902967pgq.535.2019.01.21.10.39.41; Mon, 21 Jan 2019 10:39:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=UaRqvkoN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbfAUShn (ORCPT + 99 others); Mon, 21 Jan 2019 13:37:43 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34264 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727735AbfAUShi (ORCPT ); Mon, 21 Jan 2019 13:37:38 -0500 Received: by mail-wm1-f68.google.com with SMTP id y185so6794206wmd.1 for ; Mon, 21 Jan 2019 10:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DvDjW2J5ri+L1/t5EFcSwU+ZHLISGJXvHZow6RDENGk=; b=UaRqvkoNmHSnsc0tMky0m0e163SucC8NyO5xumxs0pjp1bei31WVInpKX+wnekzsOh LqOCTwkib3Z6OHOMmvCqHwTCvBkxQ2n4zUhEumBACxn/8ielPeTbZfqMsB2hYA2svRf9 JxJxHfM/w1F9vvJRQa9pFjloDs/bqorc7DCfL3pGqfx+qBRsCTNk9Rur+0aA2pmiDRmG 63gXtC5tXhvUt+1xQ9ucx51nHLoI4qkbNXGrLtdS0AtioN3xqElidqcwXa8p+l4xUJgc fOm84Q83Qwl3s6BrgswQ6BE4L2O5aDV2bLtgr81cOK1MOx3YHVRRnwSCEOozZR2D1IVm 5pKg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=DvDjW2J5ri+L1/t5EFcSwU+ZHLISGJXvHZow6RDENGk=; b=gXPqltBbkXTKyWz/AzVMckdqBYa4nS+uJeXo6l6n0FLBrPmdQGtcYlHzekWx8kF+r8 Yd7IDX2ha0HuWvuzenzs4n+PHl3wit19MURiSHZMssB3fntkBx2CF5xxPILNlk7nEJ85 2eD84fph/imw5Ge/o5ibB1CAM4BYCPs32hcVUovT/mRXh5PwKO5u2GExKqLgkDncXiBm b87G+1h+VF0GWpUyvud3ujwBFHIK1P0P96tDYDaoNhyvz5ojsU/HpYJnYgeFsDBPTVbo 9yPMGA67ynTnTwe2x3DqxPGJoK0iPRI6hoaawCimNePmkETdPyMNDf5xRibi9Kou3Xzh m5Cw== X-Gm-Message-State: AJcUukegkIL2lnWv26MMaH/eQPnxWnT1HKW7K8V9UrRv6LKcONtsSgBp 3r2SyOyKAAKXV2zrLTElemY= X-Received: by 2002:a1c:7511:: with SMTP id o17mr529576wmc.42.1548095855568; Mon, 21 Jan 2019 10:37:35 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A8100428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:dc:d73a:8100:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id 199sm55700630wmh.21.2019.01.21.10.37.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 10:37:35 -0800 (PST) From: Martin Blumenstingl To: lgirdwood@gmail.com, broonie@kernel.org Cc: linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, boris.brezillon@free-electrons.com, thierry.reding@gmail.com, Martin Blumenstingl Subject: [PATCH 1/1] regulator: pwm: suppress EPROBE_DEFER error message Date: Mon, 21 Jan 2019 19:37:23 +0100 Message-Id: <20190121183723.25231-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121183723.25231-1-martin.blumenstingl@googlemail.com> References: <20190121183723.25231-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Suppress the "Failed to get PWM" error output if the actual error code is EPROBE_DEFER. This makes the behavior of the pwm-regulator driver consistent with what most other drivers do (which is: print all errors except EPROBE_DEFER). An example where this cleans up the kernel log are the 32-bit Amlogic Meson boards: multi_v7_defconfig has CONFIG_REGULATOR_PWM=y and CONFIG_PWM_MESON=m. When booting such a board (for example the Meson8b Odroid-C1) the following message is printed five times during boot: pwm-regulator regulator-vcck: Failed to get PWM: -517 On the sixth call the pwm-meson driver is finally loaded (as rootfs becomes ready) and the "VCCK" pwm-regulator comes up fine. Fixes: aa66cc6630a408 ("regulator: pwm-regulator: get voltage and duty table from dts") Signed-off-by: Martin Blumenstingl --- drivers/regulator/pwm-regulator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index 3f53f9134b32..7789d181ae67 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -357,7 +357,9 @@ static int pwm_regulator_probe(struct platform_device *pdev) drvdata->pwm = devm_pwm_get(&pdev->dev, NULL); if (IS_ERR(drvdata->pwm)) { ret = PTR_ERR(drvdata->pwm); - dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret); + return ret; } -- 2.20.1