hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: MIT */
#ifndef __NVKM_OPROXY_H__
#define __NVKM_OPROXY_H__
#define nvkm_oproxy(p) container_of((p), struct nvkm_oproxy, base)
#include <core/object.h>
 
struct nvkm_oproxy {
   const struct nvkm_oproxy_func *func;
   struct nvkm_object base;
   struct nvkm_object *object;
};
 
struct nvkm_oproxy_func {
   void (*dtor[2])(struct nvkm_oproxy *);
   int  (*init[2])(struct nvkm_oproxy *);
   int  (*fini[2])(struct nvkm_oproxy *, bool suspend);
};
 
void nvkm_oproxy_ctor(const struct nvkm_oproxy_func *,
             const struct nvkm_oclass *, struct nvkm_oproxy *);
int  nvkm_oproxy_new_(const struct nvkm_oproxy_func *,
             const struct nvkm_oclass *, struct nvkm_oproxy **);
#endif