[PATCH 15/18] include: add blocking notifier aliases
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Nov 10 13:44:18 PST 2023
All notifiers are blocking in barebox, but to avoid needless mechanical
fixups during porting, just provide the stubs in a new
<linux/notifier.h> header. While at it, also provide NOTIFY_DONE and
NOTIFY_DONE for use in the notifier callbacks.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/linux/notifier.h | 16 ++++++++++++++++
include/notifier.h | 3 +++
2 files changed, 19 insertions(+)
create mode 100644 include/linux/notifier.h
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
new file mode 100644
index 000000000000..25f4921a3e80
--- /dev/null
+++ b/include/linux/notifier.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __LINUX_NOTIFIER_H
+#define __LINUX_NOTIFIER_H
+
+#include <notifier.h>
+
+#define BLOCKING_NOTIFIER_HEAD NOTIFIER_HEAD
+
+#define blocking_notifier_call_chain notifier_call_chain
+
+#define blocking_notifier_head notifier_head
+
+#define blocking_notifier_chain_register notifier_chain_register
+#define blocking_notifier_chain_unregister notifier_chain_unregister
+
+#endif
diff --git a/include/notifier.h b/include/notifier.h
index 432b66c4ca5a..093fedb0e8e4 100644
--- a/include/notifier.h
+++ b/include/notifier.h
@@ -35,4 +35,7 @@ int clock_notifier_call_chain(void);
.blocks = LIST_HEAD_INIT((name).blocks), \
};
+#define NOTIFY_DONE 0x0000 /* Don't care */
+#define NOTIFY_OK 0x0001 /* Suits me */
+
#endif /* __NOTIFIER_H */
--
2.39.2
More information about the barebox
mailing list