aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/include
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-12-04 11:35:40 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-02-20 16:00:16 +1000
commit5f066c32a50eac584c0c8c19d8d5e38714f7c574 (patch)
treee6211ed14764407d23e3815fd494f77eda75bfe6 /drivers/gpu/drm/nouveau/core/include
parentbc79202f4c8ff6977133255dc2bb7d4dac3936f0 (diff)
drm/nouveau/therm: fix various style issues, make more consistent
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Martin Peres <martin.peres@labri.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/therm.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/therm.h b/drivers/gpu/drm/nouveau/core/include/subdev/therm.h
index 6cf9f931cc9..2a48bff5183 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/therm.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/therm.h
@@ -46,11 +46,24 @@ 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;