kconfig: squash prop_alloc() into menu_add_prop()
[carl9170fw.git] / config / menu.c
index 5a43784ded2cf80bc4ed3b12bc54c071e0c13a08..8b772ced755dd382cef4b184499627c582aaab21 100644 (file)
@@ -127,12 +127,28 @@ void menu_set_type(int type)
 static struct property *menu_add_prop(enum prop_type type, struct expr *expr,
                                      struct expr *dep)
 {
-       struct property *prop = prop_alloc(type, current_entry->sym);
+       struct property *prop;
 
+       prop = xmalloc(sizeof(*prop));
+       memset(prop, 0, sizeof(*prop));
+       prop->type = type;
+       prop->file = current_file;
+       prop->lineno = zconf_lineno();
        prop->menu = current_entry;
        prop->expr = expr;
        prop->visible.expr = dep;
 
+       /* append property to the prop list of symbol */
+       if (current_entry->sym) {
+               struct property **propp;
+
+               for (propp = &current_entry->sym->prop;
+                    *propp;
+                    propp = &(*propp)->next)
+                       ;
+               *propp = prop;
+       }
+
        return prop;
 }