]> git.sur5r.net Git - u-boot/blobdiff - cmd/cros_ec.c
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / cmd / cros_ec.c
index 9d42f870dc9a4e3ea61a7d267591a73a38b3135b..60c87838fdf86f1efc7639f10ac76a6e711fbc93 100644 (file)
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Chromium OS cros_ec driver
  *
  * Copyright (c) 2016 The Chromium OS Authors.
  * Copyright (c) 2016 National Instruments Corp
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -17,8 +16,6 @@
 /* Note: depends on enum ec_current_image */
 static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"};
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * Decode a flash region parameter
  *
@@ -110,7 +107,7 @@ static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                /* Remove any existing device */
                ret = uclass_find_device(UCLASS_CROS_EC, 0, &udev);
                if (!ret)
-                       device_remove(udev);
+                       device_remove(udev, DM_REMOVE_NORMAL);
                ret = uclass_get_device(UCLASS_CROS_EC, 0, &udev);
                if (ret) {
                        printf("Could not init cros_ec device (err %d)\n", ret);