Commit ff268b56 authored by Stephen Boyd's avatar Stephen Boyd Committed by Mark Brown

regulator: core: Don't spew backtraces on duplicate sysfs

We don't consider a failure to add the sysfs node as a problem,
so use sysfs_create_link_nowarn() so that we don't print a
backtrace when duplicated files exist. Also, downgrade the printk
message to a debug statement so that we're quiet here. This
allows multiple drivers to request a CPU's regulator so that
CPUfreq and AVSish drivers can coexist.
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b787f68c
...@@ -1192,10 +1192,10 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, ...@@ -1192,10 +1192,10 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
if (regulator->supply_name == NULL) if (regulator->supply_name == NULL)
goto overflow_err; goto overflow_err;
err = sysfs_create_link(&rdev->dev.kobj, &dev->kobj, err = sysfs_create_link_nowarn(&rdev->dev.kobj, &dev->kobj,
buf); buf);
if (err) { if (err) {
rdev_warn(rdev, "could not add device link %s err %d\n", rdev_dbg(rdev, "could not add device link %s err %d\n",
dev->kobj.name, err); dev->kobj.name, err);
/* non-fatal */ /* non-fatal */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment