diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-12-04 11:35:40 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-02-20 16:00:16 +1000 |
commit | 5f066c32a50eac584c0c8c19d8d5e38714f7c574 (patch) | |
tree | e6211ed14764407d23e3815fd494f77eda75bfe6 /drivers/gpu/drm/nouveau/core/include | |
parent | bc79202f4c8ff6977133255dc2bb7d4dac3936f0 (diff) | |
download | op-kernel-dev-5f066c32a50eac584c0c8c19d8d5e38714f7c574.zip op-kernel-dev-5f066c32a50eac584c0c8c19d8d5e38714f7c574.tar.gz |
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.h | 15 |
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 6cf9f93..2a48bff 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; |