Commit bf892de9 authored by Rob Herring's avatar Rob Herring Committed by Ulf Hansson

mmc: Convert to using %pOF instead of full_name

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Jan Glauber <jglauber@cavium.com>
Cc: David Daney <david.daney@cavium.com>
Cc: "Steven J. Hill" <Steven.Hill@cavium.com>
Cc: linux-mmc@vger.kernel.org
Acked-by: default avatarDavid Daney <david.daney@cavium.com>
Tested-by: default avatarSteven J. Hill <Steven.Hill@cavium.com>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent e176c255
...@@ -1134,11 +1134,11 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask) ...@@ -1134,11 +1134,11 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask)
voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges); voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges);
num_ranges = num_ranges / sizeof(*voltage_ranges) / 2; num_ranges = num_ranges / sizeof(*voltage_ranges) / 2;
if (!voltage_ranges) { if (!voltage_ranges) {
pr_debug("%s: voltage-ranges unspecified\n", np->full_name); pr_debug("%pOF: voltage-ranges unspecified\n", np);
return 0; return 0;
} }
if (!num_ranges) { if (!num_ranges) {
pr_err("%s: voltage-ranges empty\n", np->full_name); pr_err("%pOF: voltage-ranges empty\n", np);
return -EINVAL; return -EINVAL;
} }
...@@ -1150,8 +1150,8 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask) ...@@ -1150,8 +1150,8 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask)
be32_to_cpu(voltage_ranges[j]), be32_to_cpu(voltage_ranges[j]),
be32_to_cpu(voltage_ranges[j + 1])); be32_to_cpu(voltage_ranges[j + 1]));
if (!ocr_mask) { if (!ocr_mask) {
pr_err("%s: voltage-range #%d is invalid\n", pr_err("%pOF: voltage-range #%d is invalid\n",
np->full_name, i); np, i);
return -EINVAL; return -EINVAL;
} }
*mask |= ocr_mask; *mask |= ocr_mask;
......
...@@ -665,8 +665,8 @@ atmci_of_init(struct platform_device *pdev) ...@@ -665,8 +665,8 @@ atmci_of_init(struct platform_device *pdev)
for_each_child_of_node(np, cnp) { for_each_child_of_node(np, cnp) {
if (of_property_read_u32(cnp, "reg", &slot_id)) { if (of_property_read_u32(cnp, "reg", &slot_id)) {
dev_warn(&pdev->dev, "reg property is missing for %s\n", dev_warn(&pdev->dev, "reg property is missing for %pOF\n",
cnp->full_name); cnp);
continue; continue;
} }
......
...@@ -957,14 +957,12 @@ static int cvm_mmc_of_parse(struct device *dev, struct cvm_mmc_slot *slot) ...@@ -957,14 +957,12 @@ static int cvm_mmc_of_parse(struct device *dev, struct cvm_mmc_slot *slot)
ret = of_property_read_u32(node, "reg", &id); ret = of_property_read_u32(node, "reg", &id);
if (ret) { if (ret) {
dev_err(dev, "Missing or invalid reg property on %s\n", dev_err(dev, "Missing or invalid reg property on %pOF\n", node);
of_node_full_name(node));
return ret; return ret;
} }
if (id >= CAVIUM_MAX_MMC || slot->host->slot[id]) { if (id >= CAVIUM_MAX_MMC || slot->host->slot[id]) {
dev_err(dev, "Invalid reg property on %s\n", dev_err(dev, "Invalid reg property on %pOF\n", node);
of_node_full_name(node));
return -EINVAL; return -EINVAL;
} }
......
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