Commit bb923fdc authored by Rob Herring's avatar Rob Herring Committed by Guenter Roeck

hwmon: (ads1015) 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: default avatarRob Herring <robh@kernel.org>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 99b981b2
...@@ -191,24 +191,23 @@ static int ads1015_get_channels_config_of(struct i2c_client *client) ...@@ -191,24 +191,23 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)
unsigned int data_rate = ADS1015_DEFAULT_DATA_RATE; unsigned int data_rate = ADS1015_DEFAULT_DATA_RATE;
if (of_property_read_u32(node, "reg", &pval)) { if (of_property_read_u32(node, "reg", &pval)) {
dev_err(&client->dev, "invalid reg on %s\n", dev_err(&client->dev, "invalid reg on %pOF\n", node);
node->full_name);
continue; continue;
} }
channel = pval; channel = pval;
if (channel >= ADS1015_CHANNELS) { if (channel >= ADS1015_CHANNELS) {
dev_err(&client->dev, dev_err(&client->dev,
"invalid channel index %d on %s\n", "invalid channel index %d on %pOF\n",
channel, node->full_name); channel, node);
continue; continue;
} }
if (!of_property_read_u32(node, "ti,gain", &pval)) { if (!of_property_read_u32(node, "ti,gain", &pval)) {
pga = pval; pga = pval;
if (pga > 6) { if (pga > 6) {
dev_err(&client->dev, "invalid gain on %s\n", dev_err(&client->dev, "invalid gain on %pOF\n",
node->full_name); node);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -217,8 +216,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client) ...@@ -217,8 +216,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)
data_rate = pval; data_rate = pval;
if (data_rate > 7) { if (data_rate > 7) {
dev_err(&client->dev, dev_err(&client->dev,
"invalid data_rate on %s\n", "invalid data_rate on %pOF\n", node);
node->full_name);
return -EINVAL; return -EINVAL;
} }
} }
......
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