[FIX] sync set_features() call
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 24 Oct 2013 09:39:19 +0000 (13:39 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 24 Oct 2013 09:39:19 +0000 (13:39 +0400)
Change-Id: Iff2030a97508104ad0b421804bfd110f7e435c40
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
parser/features.c

index 57f27fb..66cc9aa 100644 (file)
@@ -334,7 +334,7 @@ void uninit_features(void)
 {
 }
 
-int set_features(struct conf_data *conf)
+static int do_set_features(struct conf_data *conf)
 {
        int i, ret;
        u64 feature_XOR;
@@ -372,3 +372,16 @@ int set_features(struct conf_data *conf)
 
        return 0;
 }
+
+static DEFINE_MUTEX(mutex_features);
+
+int set_features(struct conf_data *conf)
+{
+       int ret;
+
+       mutex_lock(&mutex_features);
+       ret = do_set_features(conf);
+       mutex_unlock(&mutex_features);
+
+       return ret;
+}