[PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



of_overlay_remove_all(), and its predecessor of_overlay_destroy_all(),
were never used.

Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
 Documentation/devicetree/overlay-notes.txt |  4 ----
 drivers/of/overlay.c                       | 23 -----------------------
 include/linux/of.h                         |  6 ------
 3 files changed, 33 deletions(-)

diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
index a4feb6dde8cd08e8..b84452bfa6dafc62 100644
--- a/Documentation/devicetree/overlay-notes.txt
+++ b/Documentation/devicetree/overlay-notes.txt
@@ -94,10 +94,6 @@ return value is an error or a cookie identifying this overlay.
 previously created via the call to of_overlay_fdt_apply(). Removal of an
 overlay changeset that is stacked by another will not be permitted.
 
-Finally, if you need to remove all overlays in one-go, just call
-of_overlay_remove_all() which will remove every single one in the correct
-order.
-
 Overlay DTS Format
 ------------------
 
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index dbdeef5a12863ac3..187d5fb4b111b6b0 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -1056,26 +1056,3 @@ int of_overlay_remove(int *ovcs_id)
 	return ret;
 }
 EXPORT_SYMBOL_GPL(of_overlay_remove);
-
-/**
- * of_overlay_remove_all() - Reverts and frees all overlay changesets
- *
- * Removes all overlays from the system in the correct order.
- *
- * Returns 0 on success, or a negative error number
- */
-int of_overlay_remove_all(void)
-{
-	struct overlay_changeset *ovcs, *ovcs_n;
-	int ret;
-
-	/* the tail of list is guaranteed to be safe to remove */
-	list_for_each_entry_safe_reverse(ovcs, ovcs_n, &ovcs_list, ovcs_list) {
-		ret = of_overlay_remove(&ovcs->id);
-		if (ret)
-			return ret;
-	}
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(of_overlay_remove_all);
diff --git a/include/linux/of.h b/include/linux/of.h
index 4d25e4f952d9bd4c..c6e3300950423ece 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -1374,7 +1374,6 @@ struct of_overlay_notify_data {
 int of_overlay_fdt_apply(const void *overlay_fdt, u32 overlay_fdt_size,
 			 int *ovcs_id);
 int of_overlay_remove(int *ovcs_id);
-int of_overlay_remove_all(void);
 
 int of_overlay_notifier_register(struct notifier_block *nb);
 int of_overlay_notifier_unregister(struct notifier_block *nb);
@@ -1391,11 +1390,6 @@ static inline int of_overlay_remove(int *ovcs_id)
 	return -ENOTSUPP;
 }
 
-static inline int of_overlay_remove_all(void)
-{
-	return -ENOTSUPP;
-}
-
 static inline int of_overlay_notifier_register(struct notifier_block *nb)
 {
 	return 0;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux