Commit 1b1f4efa authored by Rob Herring's avatar Rob Herring Committed by Guenter Roeck

hwmon: (ina3221) Convert to using %pOFn instead of device_node.name

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>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 25bbdccf
...@@ -576,10 +576,10 @@ static int ina3221_probe_child_from_dt(struct device *dev, ...@@ -576,10 +576,10 @@ static int ina3221_probe_child_from_dt(struct device *dev,
ret = of_property_read_u32(child, "reg", &val); ret = of_property_read_u32(child, "reg", &val);
if (ret) { 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; return ret;
} else if (val > INA3221_CHANNEL3) { } 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; return ret;
} }
...@@ -597,8 +597,8 @@ static int ina3221_probe_child_from_dt(struct device *dev, ...@@ -597,8 +597,8 @@ static int ina3221_probe_child_from_dt(struct device *dev,
/* Overwrite default shunt resistor value optionally */ /* Overwrite default shunt resistor value optionally */
if (!of_property_read_u32(child, "shunt-resistor-micro-ohms", &val)) { if (!of_property_read_u32(child, "shunt-resistor-micro-ohms", &val)) {
if (val < 1 || val > INT_MAX) { if (val < 1 || val > INT_MAX) {
dev_err(dev, "invalid shunt resistor value %u of %s\n", dev_err(dev, "invalid shunt resistor value %u of %pOFn\n",
val, child->name); val, child);
return -EINVAL; return -EINVAL;
} }
input->shunt_resistor = val; input->shunt_resistor = val;
......
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