summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ina3221.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-16 17:05:38 -0500
committerGuenter Roeck <linux@roeck-us.net>2018-12-16 18:13:14 -0500
commit1b1f4efab0e4c8a75b772369682ff423d2df59f3 (patch)
treebf986fd9f441f9319941b2075f69f35aa02c2c89 /drivers/hwmon/ina3221.c
parent25bbdccfcd8c07c44feb74700f556546ef340f0f (diff)
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: Rob Herring <robh@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/ina3221.c')
-rw-r--r--drivers/hwmon/ina3221.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
index 17a57dbc0424..e90ccac8bebb 100644
--- a/drivers/hwmon/ina3221.c
+++ b/drivers/hwmon/ina3221.c
@@ -576,10 +576,10 @@ static int ina3221_probe_child_from_dt(struct device *dev,
576 576
577 ret = of_property_read_u32(child, "reg", &val); 577 ret = of_property_read_u32(child, "reg", &val);
578 if (ret) { 578 if (ret) {
579 dev_err(dev, "missing reg property of %s\n", child->name); 579 dev_err(dev, "missing reg property of %pOFn\n", child);
580 return ret; 580 return ret;
581 } else if (val > INA3221_CHANNEL3) { 581 } else if (val > INA3221_CHANNEL3) {
582 dev_err(dev, "invalid reg %d of %s\n", val, child->name); 582 dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
583 return ret; 583 return ret;
584 } 584 }
585 585
@@ -597,8 +597,8 @@ static int ina3221_probe_child_from_dt(struct device *dev,
597 /* Overwrite default shunt resistor value optionally */ 597 /* Overwrite default shunt resistor value optionally */
598 if (!of_property_read_u32(child, "shunt-resistor-micro-ohms", &val)) { 598 if (!of_property_read_u32(child, "shunt-resistor-micro-ohms", &val)) {
599 if (val < 1 || val > INT_MAX) { 599 if (val < 1 || val > INT_MAX) {
600 dev_err(dev, "invalid shunt resistor value %u of %s\n", 600 dev_err(dev, "invalid shunt resistor value %u of %pOFn\n",
601 val, child->name); 601 val, child);
602 return -EINVAL; 602 return -EINVAL;
603 } 603 }
604 input->shunt_resistor = val; 604 input->shunt_resistor = val;