drm/nouveau: remove unused _nouveau_parent_ctor
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / gpu / drm / nouveau / core / include / core / parent.h
blob3c2e940eb0f83525f5d61b9acd7825f37ed7ba5b
1 #ifndef __NOUVEAU_PARENT_H__
2 #define __NOUVEAU_PARENT_H__
4 #include <core/device.h>
5 #include <core/object.h>
7 struct nouveau_sclass {
8 struct nouveau_sclass *sclass;
9 struct nouveau_engine *engine;
10 struct nouveau_oclass *oclass;
13 struct nouveau_parent {
14 struct nouveau_object base;
16 struct nouveau_sclass *sclass;
17 u32 engine;
19 int (*context_attach)(struct nouveau_object *,
20 struct nouveau_object *);
21 int (*context_detach)(struct nouveau_object *, bool suspend,
22 struct nouveau_object *);
24 int (*object_attach)(struct nouveau_object *parent,
25 struct nouveau_object *object, u32 name);
26 void (*object_detach)(struct nouveau_object *parent, int cookie);
29 static inline struct nouveau_parent *
30 nv_parent(void *obj)
32 #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
33 if (unlikely(!(nv_iclass(obj, NV_PARENT_CLASS))))
34 nv_assert("BAD CAST -> NvParent, %08x", nv_hclass(obj));
35 #endif
36 return obj;
39 #define nouveau_parent_create(p,e,c,v,s,m,d) \
40 nouveau_parent_create_((p), (e), (c), (v), (s), (m), \
41 sizeof(**d), (void **)d)
42 #define nouveau_parent_init(p) \
43 nouveau_object_init(&(p)->base)
44 #define nouveau_parent_fini(p,s) \
45 nouveau_object_fini(&(p)->base, (s))
47 int nouveau_parent_create_(struct nouveau_object *, struct nouveau_object *,
48 struct nouveau_oclass *, u32 pclass,
49 struct nouveau_oclass *, u64 engcls,
50 int size, void **);
51 void nouveau_parent_destroy(struct nouveau_parent *);
53 void _nouveau_parent_dtor(struct nouveau_object *);
54 #define _nouveau_parent_init _nouveau_object_init
55 #define _nouveau_parent_fini _nouveau_object_fini
57 int nouveau_parent_sclass(struct nouveau_object *, u16 handle,
58 struct nouveau_object **pengine,
59 struct nouveau_oclass **poclass);
61 #endif