diff options
author | Rob Herring <robh@kernel.org> | 2017-07-18 17:43:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 10:55:49 -0400 |
commit | 34d0eb50bd7c0c6431a67faf2e00b1316f886d45 (patch) | |
tree | 6dd105d6caff2207531566c08d89d0cb390c96b3 | |
parent | 579e9a307256e550fe918485b828517ea3c5f2fb (diff) |
misc: 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: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/eeprom/idt_89hpesx.c | 8 | ||||
-rw-r--r-- | drivers/misc/sram.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c index ab0df6a17690..37312b548a03 100644 --- a/drivers/misc/eeprom/idt_89hpesx.c +++ b/drivers/misc/eeprom/idt_89hpesx.c | |||
@@ -1132,8 +1132,8 @@ static void idt_get_ofdata(struct idt_89hpesx_dev *pdev) | |||
1132 | for_each_available_child_of_node(node, child) { | 1132 | for_each_available_child_of_node(node, child) { |
1133 | ee_id = idt_ee_match_id(child); | 1133 | ee_id = idt_ee_match_id(child); |
1134 | if (IS_ERR_OR_NULL(ee_id)) { | 1134 | if (IS_ERR_OR_NULL(ee_id)) { |
1135 | dev_warn(dev, "Skip unsupported child node %s", | 1135 | dev_warn(dev, "Skip unsupported child node %pOF", |
1136 | child->full_name); | 1136 | child); |
1137 | continue; | 1137 | continue; |
1138 | } else | 1138 | } else |
1139 | break; | 1139 | break; |
@@ -1151,8 +1151,8 @@ static void idt_get_ofdata(struct idt_89hpesx_dev *pdev) | |||
1151 | /* Get custom EEPROM address from 'reg' attribute */ | 1151 | /* Get custom EEPROM address from 'reg' attribute */ |
1152 | addr_be = of_get_property(child, "reg", &len); | 1152 | addr_be = of_get_property(child, "reg", &len); |
1153 | if (!addr_be || (len < sizeof(*addr_be))) { | 1153 | if (!addr_be || (len < sizeof(*addr_be))) { |
1154 | dev_warn(dev, "No reg on %s, use default address %d", | 1154 | dev_warn(dev, "No reg on %pOF, use default address %d", |
1155 | child->full_name, EEPROM_DEF_ADDR); | 1155 | child, EEPROM_DEF_ADDR); |
1156 | pdev->inieecmd = 0; | 1156 | pdev->inieecmd = 0; |
1157 | pdev->eeaddr = EEPROM_DEF_ADDR << 1; | 1157 | pdev->eeaddr = EEPROM_DEF_ADDR << 1; |
1158 | } else { | 1158 | } else { |
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index d1185b78cf9a..fc0415771c00 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c | |||
@@ -196,15 +196,15 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res) | |||
196 | ret = of_address_to_resource(child, 0, &child_res); | 196 | ret = of_address_to_resource(child, 0, &child_res); |
197 | if (ret < 0) { | 197 | if (ret < 0) { |
198 | dev_err(sram->dev, | 198 | dev_err(sram->dev, |
199 | "could not get address for node %s\n", | 199 | "could not get address for node %pOF\n", |
200 | child->full_name); | 200 | child); |
201 | goto err_chunks; | 201 | goto err_chunks; |
202 | } | 202 | } |
203 | 203 | ||
204 | if (child_res.start < res->start || child_res.end > res->end) { | 204 | if (child_res.start < res->start || child_res.end > res->end) { |
205 | dev_err(sram->dev, | 205 | dev_err(sram->dev, |
206 | "reserved block %s outside the sram area\n", | 206 | "reserved block %pOF outside the sram area\n", |
207 | child->full_name); | 207 | child); |
208 | ret = -EINVAL; | 208 | ret = -EINVAL; |
209 | goto err_chunks; | 209 | goto err_chunks; |
210 | } | 210 | } |
@@ -230,8 +230,8 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res) | |||
230 | ret = of_property_read_string(child, "label", &label); | 230 | ret = of_property_read_string(child, "label", &label); |
231 | if (ret && ret != -EINVAL) { | 231 | if (ret && ret != -EINVAL) { |
232 | dev_err(sram->dev, | 232 | dev_err(sram->dev, |
233 | "%s has invalid label name\n", | 233 | "%pOF has invalid label name\n", |
234 | child->full_name); | 234 | child); |
235 | goto err_chunks; | 235 | goto err_chunks; |
236 | } | 236 | } |
237 | if (!label) | 237 | if (!label) |