All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Marek Vasut <marek.vasut+renesas@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 2/3] regulator: bd9571mwv: Fix regulator name printed on registration failure
Date: Fri, 12 Mar 2021 14:02:41 +0100	[thread overview]
Message-ID: <20210312130242.3390038-3-geert+renesas@glider.be> (raw)
In-Reply-To: <20210312130242.3390038-1-geert+renesas@glider.be>

If a regulator fails to register, the driver prints an error message
like:

    bd9571mwv-regulator bd9571mwv-regulator.6.auto: failed to register bd9571mwv-regulator regulator

However, the platform device's name is already printed as part of
dev_err(), and does not allow the user to distinguish among the various
regulators that are part of the PMIC.

Fix this by printing regulator_desc.name instead, to change the message
like:

    bd9571mwv-regulator bd9571mwv-regulator.6.auto: failed to register DVFS regulator

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/regulator/bd9571mwv-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index 13393cdc6be1497e..a4d406022587d59d 100644
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -301,7 +301,7 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
 					       &config);
 		if (IS_ERR(rdev)) {
 			dev_err(&pdev->dev, "failed to register %s regulator\n",
-				pdev->name);
+				regulators[i].name);
 			return PTR_ERR(rdev);
 		}
 	}
-- 
2.25.1


  parent reply	other threads:[~2021-03-12 13:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 13:02 [PATCH 0/3] regulator: bd9571mwv: Miscellaneous fixes and improvements Geert Uytterhoeven
2021-03-12 13:02 ` [PATCH 1/3] regulator: bd9571mwv: Fix AVS and DVFS voltage range Geert Uytterhoeven
2021-03-12 13:02 ` Geert Uytterhoeven [this message]
2021-03-15  5:49   ` [PATCH 2/3] regulator: bd9571mwv: Fix regulator name printed on registration failure Matti Vaittinen
2021-03-12 13:02 ` [PATCH 3/3] regulator: bd9571mwv: Convert device attribute to sysfs_emit() Geert Uytterhoeven
2021-03-12 13:07 ` [PATCH 0/3] regulator: bd9571mwv: Miscellaneous fixes and improvements Geert Uytterhoeven
2021-03-15 16:57 ` Mark Brown

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=20210312130242.3390038-3-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.