[PATCH 3/8] state: rename partition_node to backend_node

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

 



Rename the local variable in preparation of addding support for backends
stored within a partition table. This also aligns the name with the name
used by of_state_fixup().

No functional change.

Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
 common/state/state.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/state/state.c b/common/state/state.c
index a614c849c7..d954f0d453 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -593,7 +593,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 	const char *storage_type = NULL;
 	const char *alias;
 	uint32_t stridesize;
-	struct device_node *partition_node;
+	struct device_node *backend_node;
 	off_t offset = 0;
 	size_t size = 0;
 
@@ -607,21 +607,21 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 	if (IS_ERR(state))
 		return state;
 
-	partition_node = of_parse_phandle(node, "backend", 0);
-	if (!partition_node) {
+	backend_node = of_parse_phandle(node, "backend", 0);
+	if (!backend_node) {
 		dev_err(&state->dev, "Cannot resolve \"backend\" phandle\n");
 		ret = -EINVAL;
 		goto out_release_state;
 	}
 
 #ifdef __BAREBOX__
-	ret = of_partition_ensure_probed(partition_node);
+	ret = of_partition_ensure_probed(backend_node);
 	if (ret)
 		goto out_release_state;
 
-	ret = of_find_path_by_node(partition_node, &state->backend_path, 0);
+	ret = of_find_path_by_node(backend_node, &state->backend_path, 0);
 #else
-	ret = of_get_devicepath(partition_node, &state->backend_path, &offset, &size);
+	ret = of_get_devicepath(backend_node, &state->backend_path, &offset, &size);
 #endif
 	if (ret) {
 		if (ret != -EPROBE_DEFER)
@@ -630,7 +630,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 		goto out_release_state;
 	}
 
-	state->backend_reproducible_name = of_get_reproducible_name(partition_node);
+	state->backend_reproducible_name = of_get_reproducible_name(backend_node);
 
 	ret = of_property_read_string(node, "backend-type", &backend_type);
 	if (ret) {
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux