]> git.sur5r.net Git - u-boot/blobdiff - test/dm/spi.c
ARM: rmobile: Represent SF partitioning with mtdparts on Koelsch
[u-boot] / test / dm / spi.c
index 2e27da72d505c6afe2df467c0f89fad1ad08c4a5..252b87431fb0439620a7236ec83f73de6e684df4 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2013 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -30,13 +29,13 @@ static int dm_test_spi_find(struct unit_test_state *uts)
                                                       false, &bus));
 
        /*
-        * spi_post_bind() will bind devices to chip selects. Check this then
-        * remove the emulation and the slave device.
+        * The post_bind() method will bind devices to chip selects. Check
+        * this then remove the emulation and the slave device.
         */
        ut_asserteq(0, uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus));
        ut_assertok(spi_cs_info(bus, cs, &info));
-       of_offset = info.dev->of_offset;
-       device_remove(info.dev);
+       of_offset = dev_of_offset(info.dev);
+       device_remove(info.dev, DM_REMOVE_NORMAL);
        device_unbind(info.dev);
 
        /*