lkml.org 
[lkml]   [2018]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] hwmon: ina3221: Convert to using %pOFn instead of device_node.name
Date
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/hwmon/ina3221.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
index d61688f04594..27abbc5b9d46 100644
--- a/drivers/hwmon/ina3221.c
+++ b/drivers/hwmon/ina3221.c
@@ -469,10 +469,10 @@ static int ina3221_probe_child_from_dt(struct device *dev,

ret = of_property_read_u32(child, "reg", &val);
if (ret) {
- dev_err(dev, "missing reg property of %s\n", child->name);
+ dev_err(dev, "missing reg property of %pOFn\n", child);
return ret;
} else if (val > INA3221_CHANNEL3) {
- dev_err(dev, "invalid reg %d of %s\n", val, child->name);
+ dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
return ret;
}

@@ -490,8 +490,8 @@ static int ina3221_probe_child_from_dt(struct device *dev,
/* Overwrite default shunt resistor value optionally */
if (!of_property_read_u32(child, "shunt-resistor-micro-ohms", &val)) {
if (val < 1 || val > INT_MAX) {
- dev_err(dev, "invalid shunt resistor value %u of %s\n",
- val, child->name);
+ dev_err(dev, "invalid shunt resistor value %u of %pOFn\n",
+ val, child);
return -EINVAL;
}
input->shunt_resistor = val;
--
2.19.1
\
 
 \ /
  Last update: 2018-11-16 23:06    [W:0.147 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site