summaryrefslogtreecommitdiff
path: root/include/linux/once.h
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2017-10-18 18:40:18 +0300
committerStefan Schmidt <stefan@datenfreihafen.org>2017-10-18 18:40:18 +0300
commit396665e8320987ff43b20a62a6a1cdae57aa1cc1 (patch)
treebf778eab1ef1c9ff102bb235d9bca1a42bec7d0a /include/linux/once.h
parentd01174fcd2c1ffefdd0554f847c4045a5c731591 (diff)
parentb9f1f1ce866c28e3d9b86202441b220244754a69 (diff)
downloadlinux-396665e8320987ff43b20a62a6a1cdae57aa1cc1.tar.xz
Merge remote-tracking branch 'net-next/master'
Diffstat (limited to 'include/linux/once.h')
-rw-r--r--include/linux/once.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/once.h b/include/linux/once.h
index 9c98aaa87cbc..724724918e8b 100644
--- a/include/linux/once.h
+++ b/include/linux/once.h
@@ -5,7 +5,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
@@ -38,8 +38,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)) { \