1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVIF_NOTIFY_H__
3 #define __NVIF_NOTIFY_H__
6 struct nvif_object
*object
;
9 #define NVIF_NOTIFY_USER 0
10 #define NVIF_NOTIFY_WORK 1
13 void (*dtor
)(struct nvif_notify
*);
14 #define NVIF_NOTIFY_DROP 0
15 #define NVIF_NOTIFY_KEEP 1
16 int (*func
)(struct nvif_notify
*);
18 /* this is const for a *very* good reason - the data might be on the
19 * stack from an irq handler. if you're not nvif/notify.c then you
20 * should probably think twice before casting it away...
24 struct work_struct work
;
27 int nvif_notify_init(struct nvif_object
*, int (*func
)(struct nvif_notify
*),
28 bool work
, u8 type
, void *data
, u32 size
, u32 reply
,
29 struct nvif_notify
*);
30 int nvif_notify_fini(struct nvif_notify
*);
31 int nvif_notify_get(struct nvif_notify
*);
32 int nvif_notify_put(struct nvif_notify
*);
33 int nvif_notify(const void *, u32
, const void *, u32
);