diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-03-12 20:32:45 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-13 16:49:53 +0000 |
commit | 6e5505cf3ee411761fae8b7419e4f673be41690a (patch) | |
tree | eb1226f4ec010e0b0b27ee42ef2bd865a09b0bbe /drivers/regulator/core.c | |
parent | e177440a1bba09d3ff0b2f992d03dbab2640746f (diff) | |
download | linux-stable-6e5505cf3ee411761fae8b7419e4f673be41690a.tar.gz linux-stable-6e5505cf3ee411761fae8b7419e4f673be41690a.tar.bz2 linux-stable-6e5505cf3ee411761fae8b7419e4f673be41690a.zip |
regulator: core: Avoid device name duplication in NORMAL_GET
With current code:
st-gyro-i2c i2c-PRP0001:00: i2c-PRP0001:00 supply vdd not found, using dummy regulator
which looks a bit oververbose.
Replace this with simplified format string for the above case, and drop
"deviceless" case since for all dev_*() macros used in _regulator_get()
the "(null)" will be printed anyway.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200312183245.1612-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d015d99cb59d..7486f6e4e613 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1849,7 +1849,6 @@ struct regulator *_regulator_get(struct device *dev, const char *id, { struct regulator_dev *rdev; struct regulator *regulator; - const char *devname = dev ? dev_name(dev) : "deviceless"; struct device_link *link; int ret; @@ -1887,9 +1886,7 @@ struct regulator *_regulator_get(struct device *dev, const char *id, * enabled, even if it isn't hooked up, and just * provide a dummy. */ - dev_warn(dev, - "%s supply %s not found, using dummy regulator\n", - devname, id); + dev_warn(dev, "supply %s not found, using dummy regulator\n", id); rdev = dummy_regulator_rdev; get_device(&rdev->dev); break; |