projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[firefly-linux-kernel-4.4.55.git]
/
lib
/
ts_fsm.c
diff --git
a/lib/ts_fsm.c
b/lib/ts_fsm.c
index af575b61526b97749c31bb65221af72eb457353c..5696a35184e4a3a086573c6020b9f32fcede5fe2 100644
(file)
--- a/
lib/ts_fsm.c
+++ b/
lib/ts_fsm.c
@@
-257,7
+257,7
@@
found_match:
}
static struct ts_config *fsm_init(const void *pattern, unsigned int len,
}
static struct ts_config *fsm_init(const void *pattern, unsigned int len,
-
gfp_t gfp_mask
)
+
gfp_t gfp_mask, int flags
)
{
int i, err = -EINVAL;
struct ts_config *conf;
{
int i, err = -EINVAL;
struct ts_config *conf;
@@
-269,6
+269,9
@@
static struct ts_config *fsm_init(const void *pattern, unsigned int len,
if (len % sizeof(struct ts_fsm_token) || ntokens < 1)
goto errout;
if (len % sizeof(struct ts_fsm_token) || ntokens < 1)
goto errout;
+ if (flags & TS_IGNORECASE)
+ goto errout;
+
for (i = 0; i < ntokens; i++) {
struct ts_fsm_token *t = &tokens[i];
for (i = 0; i < ntokens; i++) {
struct ts_fsm_token *t = &tokens[i];
@@
-284,6
+287,7
@@
static struct ts_config *fsm_init(const void *pattern, unsigned int len,
if (IS_ERR(conf))
return conf;
if (IS_ERR(conf))
return conf;
+ conf->flags = flags;
fsm = ts_config_priv(conf);
fsm->ntokens = ntokens;
memcpy(fsm->tokens, pattern, len);
fsm = ts_config_priv(conf);
fsm->ntokens = ntokens;
memcpy(fsm->tokens, pattern, len);