Commit d9241ff2 authored by Rob Herring's avatar Rob Herring Committed by Greg Kroah-Hartman

usb: 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>
Acked-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9acd6b2a
...@@ -227,8 +227,8 @@ int of_usb_update_otg_caps(struct device_node *np, ...@@ -227,8 +227,8 @@ int of_usb_update_otg_caps(struct device_node *np,
otg_caps->otg_rev = otg_rev; otg_caps->otg_rev = otg_rev;
break; break;
default: default:
pr_err("%s: unsupported otg-rev: 0x%x\n", pr_err("%pOF: unsupported otg-rev: 0x%x\n",
np->full_name, otg_rev); np, otg_rev);
return -EINVAL; return -EINVAL;
} }
} else { } else {
......
...@@ -149,8 +149,8 @@ static bool usbport_trig_port_observed(struct usbport_trig_data *usbport_data, ...@@ -149,8 +149,8 @@ static bool usbport_trig_port_observed(struct usbport_trig_data *usbport_data,
count = of_count_phandle_with_args(led_np, "trigger-sources", count = of_count_phandle_with_args(led_np, "trigger-sources",
"#trigger-source-cells"); "#trigger-source-cells");
if (count < 0) { if (count < 0) {
dev_warn(dev, "Failed to get trigger sources for %s\n", dev_warn(dev, "Failed to get trigger sources for %pOF\n",
led_np->full_name); led_np);
return false; return false;
} }
......
...@@ -113,7 +113,7 @@ static ssize_t devspec_show(struct device *dev, struct device_attribute *attr, ...@@ -113,7 +113,7 @@ static ssize_t devspec_show(struct device *dev, struct device_attribute *attr,
{ {
struct device_node *of_node = dev->of_node; struct device_node *of_node = dev->of_node;
return sprintf(buf, "%s\n", of_node_full_name(of_node)); return sprintf(buf, "%pOF\n", of_node);
} }
static DEVICE_ATTR_RO(devspec); static DEVICE_ATTR_RO(devspec);
#endif #endif
......
...@@ -55,8 +55,8 @@ static struct fsl_usb2_dev_data *get_dr_mode_data(struct device_node *np) ...@@ -55,8 +55,8 @@ static struct fsl_usb2_dev_data *get_dr_mode_data(struct device_node *np)
return &dr_mode_data[i]; return &dr_mode_data[i];
} }
} }
pr_warn("%s: Invalid 'dr_mode' property, fallback to host mode\n", pr_warn("%pOF: Invalid 'dr_mode' property, fallback to host mode\n",
np->full_name); np);
return &dr_mode_data[0]; /* mode not specified, use host */ return &dr_mode_data[0]; /* mode not specified, use host */
} }
......
...@@ -258,8 +258,8 @@ int ssusb_host_init(struct ssusb_mtk *ssusb, struct device_node *parent_dn) ...@@ -258,8 +258,8 @@ int ssusb_host_init(struct ssusb_mtk *ssusb, struct device_node *parent_dn)
ret = of_platform_populate(parent_dn, NULL, NULL, parent_dev); ret = of_platform_populate(parent_dn, NULL, NULL, parent_dev);
if (ret) { if (ret) {
dev_dbg(parent_dev, "failed to create child devices at %s\n", dev_dbg(parent_dev, "failed to create child devices at %pOF\n",
parent_dn->full_name); parent_dn);
return ret; return ret;
} }
......
...@@ -302,8 +302,8 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, ...@@ -302,8 +302,8 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
node = of_parse_phandle(dev->of_node, phandle, index); node = of_parse_phandle(dev->of_node, phandle, index);
if (!node) { if (!node) {
dev_dbg(dev, "failed to get %s phandle in %s node\n", phandle, dev_dbg(dev, "failed to get %s phandle in %pOF node\n", phandle,
dev->of_node->full_name); dev->of_node);
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
} }
phy = devm_usb_get_phy_by_node(dev, node, NULL); phy = devm_usb_get_phy_by_node(dev, node, NULL);
......
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