of/unittest: Fix of_platform_depopulate test case
of/unittest: Fix of_platform_depopulate test case

The previous commit, "of/unittest: early return from test skips tests"
exposed broken tests for the of_platform_unpopulate() function. The
problem was the populate and depopulate calls were not symmetrical like
they were intended to be, and unpopulate depends on the parent device to
have it's of_node pointer pointing to the parent device node. Fix these
bugs so that the test case works correctly.

In the process, the test_bus used as a container for the test devices
has been changed from a statically allocated struct device (which is
bad) to a properly allocated device with a .release() method (which is
good). This stops the test code from being a bad example of abusing the
device model.

Signed-off-by: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@linaro.org>
Cc: Frank Rowand <964289eda363137c5cb6fd2bdcdba711c4b6176d@sonymobile.com>
Cc: Pantelis Antoniou <4024101abe0c2bf4e288a39b760ad0c2158118b1@konsulko.com>
Cc: Pawel Moll <9508d67e84a03f69673bee3bb7ec593a47efeb0d@arm.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs