diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:15 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:30 +1000 |
commit | e781dc8f6cebf69bd410eb652a13e0a3797d71fe (patch) | |
tree | f7ad33f3f2b7d8d8bb0396e338113d5ef4c64d28 /drivers/gpu/drm/nouveau/nouveau_drm.c | |
parent | 76ecea5b4b9383edde2bfe49e59e76fec4e21aa4 (diff) |
drm/nouveau/device: tidy ctor/dtor interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 6180c3d30287..16c5da7db9a9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -325,9 +325,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev, remove_conflicting_framebuffers(aper, "nouveaufb", boot); kfree(aper); - ret = nvkm_device_create(pdev, NVKM_BUS_PCI, - nouveau_pci_name(pdev), pci_name(pdev), - nouveau_config, nouveau_debug, &device); + ret = nvkm_device_new(pdev, NVKM_BUS_PCI, nouveau_pci_name(pdev), + pci_name(pdev), nouveau_config, nouveau_debug, + &device); if (ret) return ret; @@ -335,7 +335,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev, ret = drm_get_pci_dev(pdev, pent, &driver_pci); if (ret) { - nvkm_object_ref(NULL, (struct nvkm_object **)&device); + nvkm_device_del(&device); return ret; } @@ -537,7 +537,7 @@ nouveau_drm_device_remove(struct drm_device *dev) device = client->device; drm_put_dev(dev); - nvkm_object_ref(NULL, (struct nvkm_object **)&device); + nvkm_device_del(&device); } static void @@ -1062,12 +1062,12 @@ nouveau_platform_device_create(struct platform_device *pdev, struct drm_device *drm; int err; - err = nvkm_device_create(pdev, NVKM_BUS_PLATFORM, - nouveau_platform_name(pdev), - dev_name(&pdev->dev), nouveau_config, - nouveau_debug, pdevice); + err = nvkm_device_new(pdev, NVKM_BUS_PLATFORM, + nouveau_platform_name(pdev), + dev_name(&pdev->dev), nouveau_config, + nouveau_debug, pdevice); if (err) - return ERR_PTR(err); + goto err_free; drm = drm_dev_alloc(&driver_platform, &pdev->dev); if (!drm) { @@ -1085,7 +1085,7 @@ nouveau_platform_device_create(struct platform_device *pdev, return drm; err_free: - nvkm_object_ref(NULL, (struct nvkm_object **)pdevice); + nvkm_device_del(pdevice); return ERR_PTR(err); } |