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