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