Merge tag 'tag-for-linus-3.5' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf
[pandora-kernel.git] / scripts / kconfig / symbol.c
index 071f00c..22a3c40 100644 (file)
@@ -262,11 +262,18 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
        struct symbol *def_sym;
        struct property *prop;
        struct expr *e;
+       int flags;
 
        /* first calculate all choice values' visibilities */
+       flags = sym->flags;
        prop = sym_get_choice_prop(sym);
-       expr_list_for_each_sym(prop->expr, e, def_sym)
+       expr_list_for_each_sym(prop->expr, e, def_sym) {
                sym_calc_visibility(def_sym);
+               if (def_sym->visible != no)
+                       flags &= def_sym->flags;
+       }
+
+       sym->flags &= flags | ~SYMBOL_DEF_USER;
 
        /* is the user choice visible? */
        def_sym = sym->def[S_DEF_USER].val;