[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190322154425.3852517-9-arnd@arndb.de>
Date: Fri, 22 Mar 2019 16:43:59 +0100
From: Arnd Bergmann <arnd@...db.de>
To: stable@...r.kernel.org, Ulf Hansson <ulf.hansson@...aro.org>,
Avri Altman <avri.altman@....com>,
Shawn Lin <shawn.lin@...k-chips.com>
Cc: Russell King <rmk+kernel@....linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Ritesh Harjani <riteshh@...eaurora.org>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
Jiong Wu <lohengrin1024@...il.com>,
Martin Hicks <mort@...k.org>, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [BACKPORT 4.4.y 08/25] mmc: core: shut up "voltage-ranges unspecified" pr_info()
From: Russell King <rmk+kernel@....linux.org.uk>
Each time a driver such as sdhci-esdhc-imx is probed, we get a info
printk complaining that the DT voltage-ranges property has not been
specified.
However, the DT binding specifically says that the voltage-ranges
property is optional. That means we should not be complaining that
DT hasn't specified this property: by indicating that it's optional,
it is valid not to have the property in DT.
Silence the warning if the property is missing.
Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
(cherry picked from commit 10a16a01d8f72e80f4780e40cf3122f4caffa411)
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/mmc/core/core.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e2e927d1f7e4..df074f8c7cb7 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1220,8 +1220,12 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask)
voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges);
num_ranges = num_ranges / sizeof(*voltage_ranges) / 2;
- if (!voltage_ranges || !num_ranges) {
- pr_info("%s: voltage-ranges unspecified\n", np->full_name);
+ if (!voltage_ranges) {
+ pr_debug("%s: voltage-ranges unspecified\n", np->full_name);
+ return -EINVAL;
+ }
+ if (!num_ranges) {
+ pr_err("%s: voltage-ranges empty\n", np->full_name);
return -EINVAL;
}
--
2.20.0
Powered by blists - more mailing lists