X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fgpu%2Fdrm%2Fnouveau%2Fcore%2Finclude%2Fsubdev%2Ftherm.h;h=a96d43ad972bf39d1dc993499a59019757a5576b;hb=7b49bd684cea3916405e1de2f8173ac42cebc87b;hp=faee569fd4581c6ef43cacc7db1b09f819f21137;hpb=58890c06691462ca29900d1116b28c7a3e131252;p=~andy%2Flinux diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/therm.h b/drivers/gpu/drm/nouveau/core/include/subdev/therm.h index faee569fd45..a96d43ad972 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/therm.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/therm.h @@ -46,13 +46,28 @@ nouveau_therm(void *obj) } #define nouveau_therm_create(p,e,o,d) \ - nouveau_subdev_create((p), (e), (o), 0, "THERM", "therm", d) + nouveau_therm_create_((p), (e), (o), sizeof(**d), (void **)d) #define nouveau_therm_destroy(p) \ nouveau_subdev_destroy(&(p)->base) +#define nouveau_therm_init(p) ({ \ + struct nouveau_therm *therm = (p); \ + _nouveau_therm_init(nv_object(therm)); \ +}) +#define nouveau_therm_fini(p,s) ({ \ + struct nouveau_therm *therm = (p); \ + _nouveau_therm_init(nv_object(therm), (s)); \ +}) + +int nouveau_therm_create_(struct nouveau_object *, struct nouveau_object *, + struct nouveau_oclass *, int, void **); #define _nouveau_therm_dtor _nouveau_subdev_dtor +int _nouveau_therm_init(struct nouveau_object *); +int _nouveau_therm_fini(struct nouveau_object *, bool); extern struct nouveau_oclass nv40_therm_oclass; extern struct nouveau_oclass nv50_therm_oclass; +extern struct nouveau_oclass nva3_therm_oclass; +extern struct nouveau_oclass nvd0_therm_oclass; #endif