regulator: core: Don't spew backtraces on duplicate sysfs
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 2 Jun 2015 01:47:54 +0000 (18:47 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 3 Jun 2015 12:19:55 +0000 (13:19 +0100)
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: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c

index 443eaab933fcfe680d5e402f72bbe7c55c3ae391..f6989485c382dd1f677fec255a1276454a898ec6 100644 (file)
@@ -1192,10 +1192,10 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
                if (regulator->supply_name == NULL)
                        goto overflow_err;
 
-               err = sysfs_create_link(&rdev->dev.kobj, &dev->kobj,
+               err = sysfs_create_link_nowarn(&rdev->dev.kobj, &dev->kobj,
                                        buf);
                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);
                        /* non-fatal */
                }
This page took 0.027229 seconds and 5 git commands to generate.