diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:15 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:31 +0300 |
commit | 4e7e62d607a711bc8e8576a0fc7d8f242d25c9b3 (patch) | |
tree | fc62b911c58058802a8897dcf20b7eb080d57335 /drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | |
parent | 102b49da15834c1d2ba508457fdf69b3d07c6fee (diff) | |
download | linux-4e7e62d607a711bc8e8576a0fc7d8f242d25c9b3.tar.xz |
drm/nouveau/client: store default device by handle, not reference
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/device/user.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c index 4867bbd0788f..c16bde41c279 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c @@ -258,12 +258,12 @@ nvkm_udevice_ctor(struct nvkm_object *parent, struct nvkm_object *engine, oclass = &nvkm_udevice_oclass_super; /* find the device subdev that matches what the client requested */ - device = client->device; - if (args->v0.device != ~0) { + if (args->v0.device != ~0) device = nvkm_device_find(args->v0.device); - if (!device) - return -ENODEV; - } + else + device = nvkm_device_find(client->device); + if (!device) + return -ENODEV; ret = nvkm_parent_create(parent, NULL, oclass, 0, nvkm_control_oclass, (1ULL << NVDEV_ENGINE_DMAOBJ) | |