Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0290c4ca authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring
Browse files

of: overlay: rename identifiers to more reflect what they do



This patch is aimed primarily at drivers/of/overlay.c, but those
changes also have a small impact in a few other files.

overlay.c is difficult to read and maintain.  Improve readability:
  - Rename functions, types and variables to better reflect what
    they do and to be consistent with names in other places,
    such as the device tree overlay FDT (flattened device tree),
    and make the algorithms more clear
  - Use the same names consistently throughout the file
  - Update comments for name changes
  - Fix incorrect comments

This patch is intended to not introduce any functional change.

Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent bbed8794
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -87,15 +87,15 @@ Overlay in-kernel API

The API is quite easy to use.

1. Call of_overlay_create() to create and apply an overlay. The return value
is a cookie identifying this overlay.
1. Call of_overlay_apply() to create and apply an overlay changeset. The return
value is an error or a cookie identifying this overlay.

2. Call of_overlay_destroy() to remove and cleanup the overlay previously
created via the call to of_overlay_create(). Removal of an overlay that
is stacked by another will not be permitted.
2. Call of_overlay_remove() to remove and cleanup the overlay changeset
previously created via the call to of_overlay_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_destroy_all() which will remove every single one in the correct
of_overlay_remove_all() which will remove every single one in the correct
order.

Overlay DTS Format
+3 −2
Original line number Diff line number Diff line
@@ -247,9 +247,10 @@ static void __init tilcdc_convert_slave_node(void)

	tilcdc_node_disable(slave);

	ret = of_overlay_create(overlay);
	ret = of_overlay_apply(overlay);
	if (ret)
		pr_err("%s: Creating overlay failed: %d\n", __func__, ret);
		pr_err("%s: Applying overlay changeset failed: %d\n",
			__func__, ret);
	else
		pr_info("%s: ti,tilcdc,slave node successfully converted\n",
			__func__);
+1 −1
Original line number Diff line number Diff line
@@ -758,7 +758,7 @@ int of_changeset_revert(struct of_changeset *ocs)
EXPORT_SYMBOL_GPL(of_changeset_revert);

/**
 * of_changeset_action - Perform a changeset action
 * of_changeset_action - Add an action to the tail of the changeset list
 *
 * @ocs:	changeset pointer
 * @action:	action to perform
Loading