summaryrefslogtreecommitdiffstats
path: root/scripts/genksyms/lex.l
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-02-15 15:11:36 +0100
committerMichal Marek <mmarek@suse.cz>2011-03-17 15:13:55 +0100
commit01762c4ec5f6f62c550304b9c70e824293cefdd0 (patch)
tree4a457cec48321f5b591966e56ddaea33733df5cc /scripts/genksyms/lex.l
parent68eb8563a1adf27fae18dde4c95fb796c17563df (diff)
downloadop-kernel-dev-01762c4ec5f6f62c550304b9c70e824293cefdd0.zip
op-kernel-dev-01762c4ec5f6f62c550304b9c70e824293cefdd0.tar.gz
genksyms: simplify usage of find_symbol()
Allow searching for symbols of an exact type. The lexer does this and a subsequent patch will add one more usage. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/genksyms/lex.l')
-rw-r--r--scripts/genksyms/lex.l3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index 4687b1d..c125d06 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -193,8 +193,7 @@ repeat:
}
if (!suppress_type_lookup)
{
- struct symbol *sym = find_symbol(yytext, SYM_TYPEDEF);
- if (sym && sym->type == SYM_TYPEDEF)
+ if (find_symbol(yytext, SYM_TYPEDEF, 1))
token = TYPE;
}
}
OpenPOWER on IntegriCloud