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: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Frank Rowand
2017-10-17 16:36:23 -07:00
committed by Rob Herring
parent bbed8794d5
commit 0290c4ca25
6 changed files with 310 additions and 271 deletions

View File

@@ -1312,26 +1312,26 @@ struct of_overlay_notify_data {
#ifdef CONFIG_OF_OVERLAY
/* ID based overlays; the API for external users */
int of_overlay_create(struct device_node *tree);
int of_overlay_destroy(int id);
int of_overlay_destroy_all(void);
int of_overlay_apply(struct device_node *tree);
int of_overlay_remove(int 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);
#else
static inline int of_overlay_create(struct device_node *tree)
static inline int of_overlay_apply(struct device_node *tree)
{
return -ENOTSUPP;
}
static inline int of_overlay_destroy(int id)
static inline int of_overlay_remove(int id)
{
return -ENOTSUPP;
}
static inline int of_overlay_destroy_all(void)
static inline int of_overlay_remove_all(void)
{
return -ENOTSUPP;
}