[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1344244720-24051-1-git-send-email-u.kleine-koenig@pengutronix.de>
Date: Mon, 6 Aug 2012 11:18:40 +0200
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Liam Girdwood <lrg@...com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: [PATCH RFC] regulator: suppress printk if there is no real info
This prevents the output of just
dummy:
in the boot log.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
Hello,
probably this really only applies to the dummy regulator. If not it
might be more sensible to do:
if (!buf[0])
buf = "no parameters";
or similar. Other than that I wonder if setting the devicename from
"dummy" to say "regulator-dummy" would be an improvement, too.
Best regards
Uwe
drivers/regulator/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 8b4b382..9275259 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -808,7 +808,8 @@ static void print_constraints(struct regulator_dev *rdev)
if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY)
count += sprintf(buf + count, "standby");
- rdev_info(rdev, "%s\n", buf);
+ if (buf[0])
+ rdev_info(rdev, "%s\n", buf);
if ((constraints->min_uV != constraints->max_uV) &&
!(constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE))
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists