summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 25b41cb012..ac20490231 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;
}