summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtd-uclass.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2023-05-05 09:13:10 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2023-05-05 09:13:10 +0200
commit266f9f2681b1ce7a9e8904dcb3b6f8de3ef59b5d (patch)
tree38e898f1d3725bd1348b5573ea4fe9dccfb90705 /drivers/mtd/mtd-uclass.c
parent5ecbc52530b00a6e2f39658be54d959c27a4f93d (diff)
parent2ee8efd6543648c6b8a14d93d52a6038854035c8 (diff)
Merge tag '08.06.00.007' into toradex_ti-u-boot-2021.01_bringup-ELB-5176
Merge TI U-Boot RC Release 08.06.00.007
Diffstat (limited to 'drivers/mtd/mtd-uclass.c')
-rw-r--r--drivers/mtd/mtd-uclass.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mtd/mtd-uclass.c b/drivers/mtd/mtd-uclass.c
index 5418217431..cf749b4a16 100644
--- a/drivers/mtd/mtd-uclass.c
+++ b/drivers/mtd/mtd-uclass.c
@@ -24,6 +24,18 @@ int mtd_probe(struct udevice *dev)
return device_probe(dev);
}
+/**
+ * mtd_remove - Remove the device @dev
+ *
+ * @dev: U-Boot device to probe
+ *
+ * @return 0 on success, an error otherwise.
+ */
+int mtd_remove(struct mtd_info *mtd)
+{
+ return device_remove(mtd->dev, DM_REMOVE_NORMAL);
+}
+
/*
* Implement a MTD uclass which should include most flash drivers.
* The uclass private is pointed to mtd_info.