aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2012-08-07 15:01:37 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-08 09:31:53 -0400
commit215b8b055de7dad26ab6c10f70130934309cb696 (patch)
tree723db8846e03ca35e4f464f8dbcda7c9554c271b
parent2f6c797f84fd764efb5eeb7cbb6a80a7244bd13c (diff)
regulator: make the dummy regulator's print_constraint more helpful
This prevents the output of just dummy: in the boot log. Now it says: regulator-dummy: no parameters which at least doesn't make it look like an accidental printk and also doesn't only use "dummy" which could mean anything. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/core.c3
-rw-r--r--drivers/regulator/dummy.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5f2221095a46..157def15ed78 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -778,6 +778,9 @@ static void print_constraints(struct regulator_dev *rdev)
778 if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY) 778 if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY)
779 count += sprintf(buf + count, "standby"); 779 count += sprintf(buf + count, "standby");
780 780
781 if (!count)
782 sprintf(buf, "no parameters");
783
781 rdev_info(rdev, "%s\n", buf); 784 rdev_info(rdev, "%s\n", buf);
782 785
783 if ((constraints->min_uV != constraints->max_uV) && 786 if ((constraints->min_uV != constraints->max_uV) &&
diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c
index 86f655c7f7a1..03a1d7c11ef2 100644
--- a/drivers/regulator/dummy.c
+++ b/drivers/regulator/dummy.c
@@ -30,7 +30,7 @@ static struct regulator_init_data dummy_initdata;
30static struct regulator_ops dummy_ops; 30static struct regulator_ops dummy_ops;
31 31
32static struct regulator_desc dummy_desc = { 32static struct regulator_desc dummy_desc = {
33 .name = "dummy", 33 .name = "regulator-dummy",
34 .id = -1, 34 .id = -1,
35 .type = REGULATOR_VOLTAGE, 35 .type = REGULATOR_VOLTAGE,
36 .owner = THIS_MODULE, 36 .owner = THIS_MODULE,