hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375
[linux-2.6.git] / kernel / jump_label.c
index 3fb7b79..01d3b70 100644 (file)
@@ -71,6 +71,7 @@ void jump_label_inc(struct jump_label_key *key)
        atomic_inc(&key->enabled);
        jump_label_unlock();
 }
+EXPORT_SYMBOL_GPL(jump_label_inc);
 
 static void __jump_label_dec(struct jump_label_key *key,
                unsigned long rate_limit, struct delayed_work *work)
@@ -86,6 +87,7 @@ static void __jump_label_dec(struct jump_label_key *key,
 
        jump_label_unlock();
 }
+EXPORT_SYMBOL_GPL(jump_label_dec);
 
 static void jump_label_update_timeout(struct work_struct *work)
 {
@@ -248,8 +250,13 @@ void jump_label_apply_nops(struct module *mod)
        if (iter_start == iter_stop)
                return;
 
-       for (iter = iter_start; iter < iter_stop; iter++)
-               arch_jump_label_transform_static(iter, JUMP_LABEL_DISABLE);
+       for (iter = iter_start; iter < iter_stop; iter++) {
+               struct jump_label_key *iterk;
+
+               iterk = (struct jump_label_key *)(unsigned long)iter->key;
+               arch_jump_label_transform_static(iter, jump_label_enabled(iterk) ?
+                               JUMP_LABEL_ENABLE : JUMP_LABEL_DISABLE);
+       }
 }
 
 static int jump_label_add_module(struct module *mod)
@@ -289,8 +296,7 @@ static int jump_label_add_module(struct module *mod)
                key->next = jlm;
 
                if (jump_label_enabled(key))
-                       __jump_label_update(key, iter, iter_stop,
-                                           JUMP_LABEL_ENABLE);
+                       __jump_label_update(key, iter, iter_stop, JUMP_LABEL_ENABLE);
        }
 
        return 0;