Skip to content

Commit

Permalink
regulator: make the dummy regulator's print_constraint more helpful
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Mark Brown committed Aug 8, 2012
1 parent 2f6c797 commit 215b8b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ static void print_constraints(struct regulator_dev *rdev)
if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY)
count += sprintf(buf + count, "standby");

if (!count)
sprintf(buf, "no parameters");

rdev_info(rdev, "%s\n", buf);

if ((constraints->min_uV != constraints->max_uV) &&
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static struct regulator_init_data dummy_initdata;
static struct regulator_ops dummy_ops;

static struct regulator_desc dummy_desc = {
.name = "dummy",
.name = "regulator-dummy",
.id = -1,
.type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE,
Expand Down

0 comments on commit 215b8b0

Please sign in to comment.