summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-07-18 17:43:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-22 09:56:53 -0400
commitd9241ff2f2acbc9241bcb4fb58c36d6a56f8c73a (patch)
treea040e8b174a2b0de16b45a887e1bc71b85922772
parent9acd6b2a343d3ed4731468747632af0f3d644369 (diff)
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: Rob Herring <robh@kernel.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/common/common.c4
-rw-r--r--drivers/usb/core/ledtrig-usbport.c4
-rw-r--r--drivers/usb/core/sysfs.c2
-rw-r--r--drivers/usb/host/fsl-mph-dr-of.c4
-rw-r--r--drivers/usb/mtu3/mtu3_host.c4
-rw-r--r--drivers/usb/phy/phy.c4
6 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index 5ef8da6e67c3..b91ba3332d8f 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -227,8 +227,8 @@ int of_usb_update_otg_caps(struct device_node *np,
227 otg_caps->otg_rev = otg_rev; 227 otg_caps->otg_rev = otg_rev;
228 break; 228 break;
229 default: 229 default:
230 pr_err("%s: unsupported otg-rev: 0x%x\n", 230 pr_err("%pOF: unsupported otg-rev: 0x%x\n",
231 np->full_name, otg_rev); 231 np, otg_rev);
232 return -EINVAL; 232 return -EINVAL;
233 } 233 }
234 } else { 234 } else {
diff --git a/drivers/usb/core/ledtrig-usbport.c b/drivers/usb/core/ledtrig-usbport.c
index 16c19a31dad1..5e265882ad2a 100644
--- a/drivers/usb/core/ledtrig-usbport.c
+++ b/drivers/usb/core/ledtrig-usbport.c
@@ -149,8 +149,8 @@ static bool usbport_trig_port_observed(struct usbport_trig_data *usbport_data,
149 count = of_count_phandle_with_args(led_np, "trigger-sources", 149 count = of_count_phandle_with_args(led_np, "trigger-sources",
150 "#trigger-source-cells"); 150 "#trigger-source-cells");
151 if (count < 0) { 151 if (count < 0) {
152 dev_warn(dev, "Failed to get trigger sources for %s\n", 152 dev_warn(dev, "Failed to get trigger sources for %pOF\n",
153 led_np->full_name); 153 led_np);
154 return false; 154 return false;
155 } 155 }
156 156
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index dfc68ed24db1..d930bfda4010 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -113,7 +113,7 @@ static ssize_t devspec_show(struct device *dev, struct device_attribute *attr,
113{ 113{
114 struct device_node *of_node = dev->of_node; 114 struct device_node *of_node = dev->of_node;
115 115
116 return sprintf(buf, "%s\n", of_node_full_name(of_node)); 116 return sprintf(buf, "%pOF\n", of_node);
117} 117}
118static DEVICE_ATTR_RO(devspec); 118static DEVICE_ATTR_RO(devspec);
119#endif 119#endif
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index e90ddb530765..ba557cdba8ef 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -55,8 +55,8 @@ static struct fsl_usb2_dev_data *get_dr_mode_data(struct device_node *np)
55 return &dr_mode_data[i]; 55 return &dr_mode_data[i];
56 } 56 }
57 } 57 }
58 pr_warn("%s: Invalid 'dr_mode' property, fallback to host mode\n", 58 pr_warn("%pOF: Invalid 'dr_mode' property, fallback to host mode\n",
59 np->full_name); 59 np);
60 return &dr_mode_data[0]; /* mode not specified, use host */ 60 return &dr_mode_data[0]; /* mode not specified, use host */
61} 61}
62 62
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index cd4d01087855..e42d308b8dc2 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -258,8 +258,8 @@ int ssusb_host_init(struct ssusb_mtk *ssusb, struct device_node *parent_dn)
258 258
259 ret = of_platform_populate(parent_dn, NULL, NULL, parent_dev); 259 ret = of_platform_populate(parent_dn, NULL, NULL, parent_dev);
260 if (ret) { 260 if (ret) {
261 dev_dbg(parent_dev, "failed to create child devices at %s\n", 261 dev_dbg(parent_dev, "failed to create child devices at %pOF\n",
262 parent_dn->full_name); 262 parent_dn);
263 return ret; 263 return ret;
264 } 264 }
265 265
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index 032f5afaad4b..75f3127407af 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -302,8 +302,8 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
302 302
303 node = of_parse_phandle(dev->of_node, phandle, index); 303 node = of_parse_phandle(dev->of_node, phandle, index);
304 if (!node) { 304 if (!node) {
305 dev_dbg(dev, "failed to get %s phandle in %s node\n", phandle, 305 dev_dbg(dev, "failed to get %s phandle in %pOF node\n", phandle,
306 dev->of_node->full_name); 306 dev->of_node);
307 return ERR_PTR(-ENODEV); 307 return ERR_PTR(-ENODEV);
308 } 308 }
309 phy = devm_usb_get_phy_by_node(dev, node, NULL); 309 phy = devm_usb_get_phy_by_node(dev, node, NULL);