rockchip: misc: protect serial# from getting overwritten
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Fri, 29 Nov 2019 15:40:43 +0000 (16:40 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Thu, 5 Dec 2019 15:53:07 +0000 (23:53 +0800)
commitfd3a7ae8e6fa58a566dae182098effc61c2d9efd
tree0587ae79de4cc364d266a0c271b1dcf605403eb8
parentd490fadc703c54f61e6ba8f47dfd7a4702ac2293
rockchip: misc: protect serial# from getting overwritten

serial# is one of the vendor properties and thus protected from being
overwritten if already set. If env_set is called anyway this result in
some nasty warnings, so check for presence before trying that.

In the same direction check for the presence of cpuid# and compare it
to the actual hardware and emit a warning if they don't match.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/misc.c