Skip to content

Commit

Permalink
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  initramfs: Really fix build break on symbol-prefixed archs
  [media] Fix Kconfig errors due to two visible menus
  i2c/algos: convert Kconfig to use the menu's `visible' keyword
  media/video: convert Kconfig to use the menu's `visible' keyword
  Revert "i2c: Fix Kconfig dependencies"
  kconfig: regen parser
  kconfig: add an option to determine a menu's visibility
  • Loading branch information
torvalds committed Dec 6, 2010
2 parents 47ad504 + 3079910 commit 31c67c7
Show file tree
Hide file tree
Showing 13 changed files with 401 additions and 363 deletions.
3 changes: 1 addition & 2 deletions drivers/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ config I2C_HELPER_AUTO
In doubt, say Y.

config I2C_SMBUS
tristate
prompt "SMBus-specific protocols" if !I2C_HELPER_AUTO
tristate "SMBus-specific protocols" if !I2C_HELPER_AUTO
help
Say Y here if you want support for SMBus extensions to the I2C
specification. At the moment, the only supported extension is
Expand Down
14 changes: 1 addition & 13 deletions drivers/i2c/algos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

menu "I2C Algorithms"
depends on !I2C_HELPER_AUTO
visible if !I2C_HELPER_AUTO

config I2C_ALGOBIT
tristate "I2C bit-banging interfaces"
Expand All @@ -15,15 +15,3 @@ config I2C_ALGOPCA
tristate "I2C PCA 9564 interfaces"

endmenu

# In automatic configuration mode, we still have to define the
# symbols to avoid unmet dependencies.

if I2C_HELPER_AUTO
config I2C_ALGOBIT
tristate
config I2C_ALGOPCF
tristate
config I2C_ALGOPCA
tristate
endif
8 changes: 4 additions & 4 deletions drivers/media/common/tuners/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ config MEDIA_TUNER
select MEDIA_TUNER_TDA9887 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_MC44S803 if !MEDIA_TUNER_CUSTOMISE

menuconfig MEDIA_TUNER_CUSTOMISE
config MEDIA_TUNER_CUSTOMISE
bool "Customize analog and hybrid tuner modules to build"
depends on MEDIA_TUNER
default y if EMBEDDED
Expand All @@ -44,7 +44,8 @@ menuconfig MEDIA_TUNER_CUSTOMISE

If unsure say N.

if MEDIA_TUNER_CUSTOMISE
menu "Customize TV tuners"
visible if MEDIA_TUNER_CUSTOMISE

config MEDIA_TUNER_SIMPLE
tristate "Simple tuner support"
Expand Down Expand Up @@ -185,5 +186,4 @@ config MEDIA_TUNER_TDA18218
default m if MEDIA_TUNER_CUSTOMISE
help
NXP TDA18218 silicon tuner driver.

endif # MEDIA_TUNER_CUSTOMISE
endmenu
5 changes: 1 addition & 4 deletions drivers/media/dvb/frontends/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ config DVB_FE_CUSTOMISE

If unsure say N.

if DVB_FE_CUSTOMISE

menu "Customise DVB Frontends"
visible if DVB_FE_CUSTOMISE

comment "Multistandard (satellite) frontends"
depends on DVB_CORE
Expand Down Expand Up @@ -619,5 +618,3 @@ config DVB_DUMMY_FE
tristate "Dummy frontend driver"
default n
endmenu

endif
2 changes: 1 addition & 1 deletion drivers/media/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ config VIDEO_IR_I2C
#

menu "Encoders/decoders and other helper chips"
depends on !VIDEO_HELPER_CHIPS_AUTO
visible if !VIDEO_HELPER_CHIPS_AUTO

comment "Audio decoders"

Expand Down
1 change: 1 addition & 0 deletions scripts/kconfig/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ struct menu {
struct menu *list;
struct symbol *sym;
struct property *prompt;
struct expr *visibility;
struct expr *dep;
unsigned int flags;
char *help;
Expand Down
1 change: 1 addition & 0 deletions scripts/kconfig/lkc.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void menu_end_menu(void);
void menu_add_entry(struct symbol *sym);
void menu_end_entry(void);
void menu_add_dep(struct expr *dep);
void menu_add_visibility(struct expr *dep);
struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
Expand Down
11 changes: 11 additions & 0 deletions scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr
return menu_add_prop(type, prompt, NULL, dep);
}

void menu_add_visibility(struct expr *expr)
{
current_entry->visibility = expr_alloc_and(current_entry->visibility,
expr);
}

void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
{
menu_add_prop(type, NULL, expr, dep);
Expand Down Expand Up @@ -410,6 +416,11 @@ bool menu_is_visible(struct menu *menu)
if (!menu->prompt)
return false;

if (menu->visibility) {
if (expr_calc_value(menu->visibility) == no)
return no;
}

sym = menu->sym;
if (sym) {
sym_calc_value(sym);
Expand Down
1 change: 1 addition & 0 deletions scripts/kconfig/zconf.gperf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ hex, T_TYPE, TF_COMMAND, S_HEX
string, T_TYPE, TF_COMMAND, S_STRING
select, T_SELECT, TF_COMMAND
range, T_RANGE, TF_COMMAND
visible, T_VISIBLE, TF_COMMAND
option, T_OPTION, TF_COMMAND
on, T_ON, TF_PARAM
modules, T_OPT_MODULES, TF_OPTION
Expand Down
122 changes: 64 additions & 58 deletions scripts/kconfig/zconf.hash.c_shipped
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
struct kconf_id;

static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
/* maximum key range = 47, duplicates = 0 */
/* maximum key range = 50, duplicates = 0 */

#ifdef __GNUC__
__inline
Expand All @@ -46,32 +46,32 @@ kconf_id_hash (register const char *str, register unsigned int len)
{
static unsigned char asso_values[] =
{
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 11, 5,
0, 0, 5, 49, 5, 20, 49, 49, 5, 20,
5, 0, 30, 49, 0, 15, 0, 10, 0, 49,
25, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 40, 5,
0, 0, 5, 52, 0, 20, 52, 52, 10, 20,
5, 0, 35, 52, 0, 30, 0, 15, 0, 52,
15, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52
};
register int hval = len;

Expand Down Expand Up @@ -102,25 +102,26 @@ struct kconf_id_strings_t
char kconf_id_strings_str12[sizeof("default")];
char kconf_id_strings_str13[sizeof("def_bool")];
char kconf_id_strings_str14[sizeof("help")];
char kconf_id_strings_str15[sizeof("bool")];
char kconf_id_strings_str16[sizeof("config")];
char kconf_id_strings_str17[sizeof("def_tristate")];
char kconf_id_strings_str18[sizeof("boolean")];
char kconf_id_strings_str18[sizeof("hex")];
char kconf_id_strings_str19[sizeof("defconfig_list")];
char kconf_id_strings_str21[sizeof("string")];
char kconf_id_strings_str22[sizeof("if")];
char kconf_id_strings_str23[sizeof("int")];
char kconf_id_strings_str26[sizeof("select")];
char kconf_id_strings_str27[sizeof("modules")];
char kconf_id_strings_str28[sizeof("tristate")];
char kconf_id_strings_str29[sizeof("menu")];
char kconf_id_strings_str31[sizeof("source")];
char kconf_id_strings_str32[sizeof("comment")];
char kconf_id_strings_str33[sizeof("hex")];
char kconf_id_strings_str35[sizeof("menuconfig")];
char kconf_id_strings_str36[sizeof("prompt")];
char kconf_id_strings_str37[sizeof("depends")];
char kconf_id_strings_str36[sizeof("string")];
char kconf_id_strings_str37[sizeof("visible")];
char kconf_id_strings_str41[sizeof("prompt")];
char kconf_id_strings_str42[sizeof("depends")];
char kconf_id_strings_str44[sizeof("bool")];
char kconf_id_strings_str46[sizeof("select")];
char kconf_id_strings_str47[sizeof("boolean")];
char kconf_id_strings_str48[sizeof("mainmenu")];
char kconf_id_strings_str51[sizeof("source")];
};
static struct kconf_id_strings_t kconf_id_strings_contents =
{
Expand All @@ -136,25 +137,26 @@ static struct kconf_id_strings_t kconf_id_strings_contents =
"default",
"def_bool",
"help",
"bool",
"config",
"def_tristate",
"boolean",
"hex",
"defconfig_list",
"string",
"if",
"int",
"select",
"modules",
"tristate",
"menu",
"source",
"comment",
"hex",
"menuconfig",
"string",
"visible",
"prompt",
"depends",
"mainmenu"
"bool",
"select",
"boolean",
"mainmenu",
"source"
};
#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
#ifdef __GNUC__
Expand All @@ -168,11 +170,11 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{
enum
{
TOTAL_KEYWORDS = 31,
TOTAL_KEYWORDS = 32,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 14,
MIN_HASH_VALUE = 2,
MAX_HASH_VALUE = 48
MAX_HASH_VALUE = 51
};

static struct kconf_id wordlist[] =
Expand All @@ -191,31 +193,35 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND},
{-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SOURCE, TF_COMMAND},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_HEX},
{-1},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND},
{-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND}
};

if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
Expand Down
Loading

0 comments on commit 31c67c7

Please sign in to comment.