of: fix of_update_property()
authorXiubo Li <Li.Xiubo@freescale.com>
Wed, 22 Jan 2014 05:57:40 +0000 (13:57 +0800)
committerGrant Likely <grant.likely@linaro.org>
Tue, 4 Feb 2014 17:24:25 +0000 (17:24 +0000)
commit02ed594e7113644c06ae3a89bc9215d839510efc
tree446be5e427cc97bf3b4de76cbad996edfd72d005
parent62664f67775fad840cf6f68d6b5f428817bef6c5
of: fix of_update_property()

The of_update_property() is intented to update a property in a node
and if the property does not exist, will add it.

The second search of the property is possibly won't be found, that
maybe removed by other thread just before the second search begain.

Using the __of_find_property() and __of_add_property() instead and
move them into lock operations.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/base.c