diff --git a/Documentation/devicetree/overlay-notes.rst b/Documentation/devicetree/overlay-notes.rst index ba401ef850e7..f2bb1145bd9f 100644 --- a/Documentation/devicetree/overlay-notes.rst +++ b/Documentation/devicetree/overlay-notes.rst @@ -115,10 +115,6 @@ The API is quite easy to use. 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. - There is the option to register notifiers that get called on overlay operations. See of_overlay_notifier_register/unregister and enum of_overlay_notify_action for details. diff --git a/Documentation/translations/zh_CN/devicetree/overlay-notes.rst b/Documentation/translations/zh_CN/devicetree/overlay-notes.rst index ba5edd05dc1e..f1217ea2ff44 100644 --- a/Documentation/translations/zh_CN/devicetree/overlay-notes.rst +++ b/Documentation/translations/zh_CN/devicetree/overlay-notes.rst @@ -116,9 +116,6 @@ DT中的适当位置。在这种情况下,可以提供目标路径。通过标 2) 调用of_overlay_remove()来删除和清理先前通过调用of_overlay_fdt_apply() 而创建的覆盖变更集。不允许删除一个被另一个覆盖的覆盖变化集。 -最后,如果你需要一次性删除所有的覆盖,只需调用of_overlay_remove_all(), -它将以正确的顺序删除每一个覆盖。 - 你可以选择注册在覆盖操作中被调用的通知器。详见 of_overlay_notifier_register/unregister和enum of_overlay_notify_action。 diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 08d5351746be..dd8571371983 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -1273,26 +1273,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. - * - * Return: 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 b920aac6b975..44d83133a65a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -1837,7 +1837,6 @@ struct of_overlay_notify_data { int of_overlay_fdt_apply(const void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id, const struct device_node *target_base); 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); @@ -1855,11 +1854,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;