Commit 1fc378fa authored by Rob Herring's avatar Rob Herring Committed by Jonathan Cameron

iio: 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: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1e46774f
...@@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev, ...@@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev,
* mux. * mux.
*/ */
if (iiospec->args_count != 2) { if (iiospec->args_count != 2) {
dev_err(&indio_dev->dev, "wrong number of arguments for %s need 2 got %d\n", dev_err(&indio_dev->dev, "wrong number of arguments for %pOFn need 2 got %d\n",
iiospec->np->name, iiospec->np,
iiospec->args_count); iiospec->args_count);
return -EINVAL; return -EINVAL;
} }
......
...@@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) ...@@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)
for_each_child_of_node(np, child) { for_each_child_of_node(np, child) {
of_id = of_match_node(rcar_gyroadc_child_match, child); of_id = of_match_node(rcar_gyroadc_child_match, child);
if (!of_id) { if (!of_id) {
dev_err(dev, "Ignoring unsupported ADC \"%s\".", dev_err(dev, "Ignoring unsupported ADC \"%pOFn\".",
child->name); child);
continue; continue;
} }
...@@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) ...@@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)
ret = of_property_read_u32(child, "reg", &reg); ret = of_property_read_u32(child, "reg", &reg);
if (ret) { if (ret) {
dev_err(dev, dev_err(dev,
"Failed to get child reg property of ADC \"%s\".\n", "Failed to get child reg property of ADC \"%pOFn\".\n",
child->name); child);
return ret; return ret;
} }
/* Channel number is too high. */ /* Channel number is too high. */
if (reg >= num_channels) { if (reg >= num_channels) {
dev_err(dev, dev_err(dev,
"Only %i channels supported with %s, but reg = <%i>.\n", "Only %i channels supported with %pOFn, but reg = <%i>.\n",
num_channels, child->name, reg); num_channels, child, reg);
return ret; return ret;
} }
} }
......
...@@ -388,7 +388,7 @@ static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev) ...@@ -388,7 +388,7 @@ static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev)
if (!pdata) if (!pdata)
return NULL; return NULL;
strncpy(&pdata->name[0], np->name, SPI_NAME_SIZE - 1); snprintf(&pdata->name[0], SPI_NAME_SIZE - 1, "%pOFn", np);
tmp = 10000; tmp = 10000;
of_property_read_u32(np, "adi,channel-spacing", &tmp); of_property_read_u32(np, "adi,channel-spacing", &tmp);
......
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