[PATCH 2/3] mtd: of: only add partition layout param when GLOBAL support is enabled

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

 



Fixes: a2fa18f9f483 (mtd: of: Make used partition binding configurable)
Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



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

  Powered by Linux