Re: [PATCH 15/18] include: add blocking notifier aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 10, 2023 at 10:44:18PM +0100, Ahmad Fatoum wrote:
> 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.

The 2nd NOTIFY_DONE s/NOTIFY_DONE/NOTIFY_OK/

Sascha

> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> ---
>  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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux