From 706865afe54eee83c1f3d7e9ea2f51db8e986d7b Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 20 Mar 2017 12:51:48 +0100 Subject: dm: core: Add flags parameter to device_remove() This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "normal" device removal. This is in preparation for the driver specific pre-OS (e.g. DMA cancelling) remove support. Signed-off-by: Stefan Roese Cc: Simon Glass Acked-by: Simon Glass --- cmd/cros_ec.c | 2 +- cmd/sf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index 9d42f870dc9..af0b4eee783 100644 --- a/cmd/cros_ec.c +++ b/cmd/cros_ec.c @@ -110,7 +110,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); diff --git a/cmd/sf.c b/cmd/sf.c index 65b117feee2..f971eec781c 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -124,7 +124,7 @@ static int do_spi_flash_probe(int argc, char * const argv[]) /* Remove the old device, otherwise probe will just be a nop */ ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new); if (!ret) { - device_remove(new); + device_remove(new, DM_REMOVE_NORMAL); } flash = NULL; ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new); -- cgit v1.2.3