summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-04-12 15:35:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-04-19 08:33:59 +0200
commit34cdd9eef5536db9952a1a6fb9c70cd3a0b42b96 (patch)
tree868eaa00216027951b413d7b70327322f2e4f106
parent66e75352db9abab6735495c5fc5fc9146c2d863d (diff)
downloadbarebox-34cdd9eef5536db9952a1a6fb9c70cd3a0b42b96.tar.gz
mtd: of: only add partition layout param when GLOBAL support is enabled
Fixes: a2fa18f9f483 (mtd: of: Make used partition binding configurable) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/of/partition.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 25b41cb..ac20490 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -253,9 +253,11 @@ static const char *of_binding_names[] = {
static int of_partition_init(void)
{
- dev_add_param_enum(&global_device, "of_partition_binding", NULL, NULL,
- &of_partition_binding, of_binding_names,
- ARRAY_SIZE(of_binding_names), NULL);
+ if (IS_ENABLED(CONFIG_GLOBALVAR))
+ dev_add_param_enum(&global_device, "of_partition_binding",
+ NULL, NULL,
+ &of_partition_binding, of_binding_names,
+ ARRAY_SIZE(of_binding_names), NULL);
return 0;
}