[PATCH 2/3] mtd: of: only add partition layout param when GLOBAL support is enabled
Lucas Stach
l.stach at pengutronix.de
Wed Apr 12 06:35:38 PDT 2017
Fixes: a2fa18f9f483 (mtd: of: Make used partition binding configurable)
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
drivers/of/partition.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 25b41cb012c6..ac20490231b5 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;
}
--
2.11.0
More information about the barebox
mailing list