]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
hwmon: (ina3221) Convert to using %pOFn instead of device_node.name
authorRob Herring <robh@kernel.org>
Fri, 16 Nov 2018 22:05:38 +0000 (16:05 -0600)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 16 Dec 2018 23:13:14 +0000 (15:13 -0800)
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: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina3221.c

index 17a57dbc0424f5618cfe860e1a25947f83129c5b..e90ccac8bebb84967e8d25094a0552b9be9d8df8 100644 (file)
@@ -576,10 +576,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;
        }
 
@@ -597,8 +597,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;