0001
0002 #ifndef __NVKM_OPROXY_H__
0003 #define __NVKM_OPROXY_H__
0004 #define nvkm_oproxy(p) container_of((p), struct nvkm_oproxy, base)
0005 #include <core/object.h>
0006
0007 struct nvkm_oproxy {
0008 const struct nvkm_oproxy_func *func;
0009 struct nvkm_object base;
0010 struct nvkm_object *object;
0011 };
0012
0013 struct nvkm_oproxy_func {
0014 void (*dtor[2])(struct nvkm_oproxy *);
0015 int (*init[2])(struct nvkm_oproxy *);
0016 int (*fini[2])(struct nvkm_oproxy *, bool suspend);
0017 };
0018
0019 void nvkm_oproxy_ctor(const struct nvkm_oproxy_func *,
0020 const struct nvkm_oclass *, struct nvkm_oproxy *);
0021 int nvkm_oproxy_new_(const struct nvkm_oproxy_func *,
0022 const struct nvkm_oclass *, struct nvkm_oproxy **);
0023 #endif