1 /*
2  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17  /**
18   * DOC: qdf_hang_event_notifier
19   * This file provides OS dependent QDF notifier call for hang event
20   */
21 
22 #include <i_qdf_notifier.h>
23 #include <qdf_notifier.h>
24 #include <qdf_hang_event_notifier.h>
25 
qdf_atomic_notifier_init(qdf_hang_event_notif_head)26 static qdf_atomic_notifier_init(qdf_hang_event_notif_head)
27 
28 QDF_STATUS qdf_hang_event_register_notifier(qdf_notif_block *nb)
29 {
30 	return qdf_register_atomic_notifier_chain(&qdf_hang_event_notif_head,
31 						  nb);
32 }
33 
qdf_hang_event_unregister_notifier(qdf_notif_block * nb)34 QDF_STATUS qdf_hang_event_unregister_notifier(qdf_notif_block *nb)
35 {
36 	return qdf_unregister_atomic_notifier_chain(&qdf_hang_event_notif_head,
37 						    nb);
38 }
39 
qdf_hang_event_notifier_call(unsigned long v,void * data)40 QDF_STATUS qdf_hang_event_notifier_call(unsigned long v, void *data)
41 {
42 	return qdf_atomic_notfier_call(&qdf_hang_event_notif_head,
43 					 v, data);
44 }
45