Commit 215b8b05 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Mark Brown

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 2f6c797f
...@@ -778,6 +778,9 @@ static void print_constraints(struct regulator_dev *rdev) ...@@ -778,6 +778,9 @@ static void print_constraints(struct regulator_dev *rdev)
if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY) if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY)
count += sprintf(buf + count, "standby"); count += sprintf(buf + count, "standby");
if (!count)
sprintf(buf, "no parameters");
rdev_info(rdev, "%s\n", buf); rdev_info(rdev, "%s\n", buf);
if ((constraints->min_uV != constraints->max_uV) && if ((constraints->min_uV != constraints->max_uV) &&
......
...@@ -30,7 +30,7 @@ static struct regulator_init_data dummy_initdata; ...@@ -30,7 +30,7 @@ static struct regulator_init_data dummy_initdata;
static struct regulator_ops dummy_ops; static struct regulator_ops dummy_ops;
static struct regulator_desc dummy_desc = { static struct regulator_desc dummy_desc = {
.name = "dummy", .name = "regulator-dummy",
.id = -1, .id = -1,
.type = REGULATOR_VOLTAGE, .type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
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