summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-05-23 09:31:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-05-23 09:40:18 +0200
commit02a0af266e45a936e50454fdc6ae949b5245c3ac (patch)
treece6f0e9176b98b1e2d13405e7898dcad66796ba2
parentd528a3bbe6417c569342e5f0861e11c4092ecf36 (diff)
downloadbarebox-02a0af266e45a936e50454fdc6ae949b5245c3ac.tar.gz
state: do not complain about missing backend-storage-type
backend-storage-type is irrelevant for mtd devices, so do not complain about this option missing. The mtd backend will print messages if necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/state/state.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/common/state/state.c b/common/state/state.c
index 878fd1b..121ba0c 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -571,7 +571,7 @@ struct state *state_new_from_node(struct device_node *node, char *path,
struct state *state;
int ret = 0;
const char *backend_type;
- const char *storage_type;
+ const char *storage_type = NULL;
const char *alias;
uint32_t stridesize;
@@ -616,12 +616,7 @@ struct state *state_new_from_node(struct device_node *node, char *path,
stridesize = 0;
}
- ret = of_property_read_string(node, "backend-storage-type",
- &storage_type);
- if (ret) {
- storage_type = NULL;
- dev_info(&state->dev, "No backend-storage-type found, using default.\n");
- }
+ of_property_read_string(node, "backend-storage-type", &storage_type);
ret = state_format_init(state, backend_type, node, alias);
if (ret)