of: Use vargs in __of_node_alloc
authorGrant Likely <grant.likely@linaro.org>
Fri, 14 Nov 2014 15:33:07 +0000 (15:33 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 17 Feb 2015 02:56:13 +0000 (11:56 +0900)
commit644d38f5abcee9cd78719ede58ef72e1b2ab47e8
tree904a4234c6b5a1faeafdcf1155d6cb567f4713ca
parentb529a532ec6f76517a5e6631c37e8951a079a24b
of: Use vargs in __of_node_alloc

The overlay code needs to construct a new full_name from the parent name
and the node name, but the current method has to allocate and then free
an temporary string which is wasteful. Fix this problem by using vargs
to pass in a format and arguments into __of_node_alloc().

At the same time remove the allocflags argument to __of_node_alloc().
The only users all use GFP_KERNEL, so there is no need to provide it as
an option. If there is ever a need later it can be added back.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
(cherry picked from commit ef8bbd73a76197cf8362a2b43aaadc5717bd0746)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
drivers/of/unittest.c
drivers/of/dynamic.c
drivers/of/of_private.h