aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-11-08 20:36:33 -0500
committerBen Skeggs <bskeggs@redhat.com>2011-12-21 04:01:33 -0500
commit2a44e4997c5fee8e1da1589ff57e0bd1c53f03ce (patch)
tree26fa7eb5269183d1fbc5314db7cad4f4a8abc720 /drivers/gpu/drm/nouveau/nouveau_display.c
parentd2edab4acffb35a6e24259886d377774efd37e6e (diff)
drm/nouveau/disp: introduce proper init/fini, separate from create/destroy
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 38623a25d0b1..803248d467fb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -262,7 +262,10 @@ nouveau_display_create(struct drm_device *dev)
262 if (ret) 262 if (ret)
263 return ret; 263 return ret;
264 264
265 return 0; 265 ret = disp->init(dev);
266 if (ret)
267 disp->destroy(dev);
268 return ret;
266} 269}
267 270
268void 271void
@@ -271,6 +274,7 @@ nouveau_display_destroy(struct drm_device *dev)
271 struct drm_nouveau_private *dev_priv = dev->dev_private; 274 struct drm_nouveau_private *dev_priv = dev->dev_private;
272 struct nouveau_display_engine *disp = &dev_priv->engine.display; 275 struct nouveau_display_engine *disp = &dev_priv->engine.display;
273 276
277 disp->fini(dev);
274 disp->destroy(dev); 278 disp->destroy(dev);
275 drm_mode_config_cleanup(dev); 279 drm_mode_config_cleanup(dev);
276} 280}