]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/once.h
regulator: ab8500: Remove AB8505 USB regulator
[mirror_ubuntu-bionic-kernel.git] / include / linux / once.h
index 6790884d3c57a244525102b3409bfdb9dbb7ecae..9225ee6d96c75632f123b0b0b3fe4a2e6789397b 100644 (file)
@@ -6,7 +6,7 @@
 #include <linux/jump_label.h>
 
 bool __do_once_start(bool *done, unsigned long *flags);
-void __do_once_done(bool *done, struct static_key *once_key,
+void __do_once_done(bool *done, struct static_key_true *once_key,
                    unsigned long *flags);
 
 /* Call a function exactly once. The idea of DO_ONCE() is to perform
@@ -39,8 +39,8 @@ void __do_once_done(bool *done, struct static_key *once_key,
        ({                                                                   \
                bool ___ret = false;                                         \
                static bool ___done = false;                                 \
-               static struct static_key ___once_key = STATIC_KEY_INIT_TRUE; \
-               if (static_key_true(&___once_key)) {                         \
+               static DEFINE_STATIC_KEY_TRUE(___once_key);                  \
+               if (static_branch_unlikely(&___once_key)) {                  \
                        unsigned long ___flags;                              \
                        ___ret = __do_once_start(&___done, &___flags);       \
                        if (unlikely(___ret)) {                              \