diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif/client.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/client.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/client.c b/drivers/gpu/drm/nouveau/nvif/client.c index 12db54965c20..12644f811b3e 100644 --- a/drivers/gpu/drm/nouveau/nvif/client.c +++ b/drivers/gpu/drm/nouveau/nvif/client.c @@ -48,9 +48,9 @@ nvif_client_resume(struct nvif_client *client) } void -nvif_client_fini(struct nvif_client *client) +nvif_client_dtor(struct nvif_client *client) { - nvif_object_fini(&client->object); + nvif_object_dtor(&client->object); if (client->driver) { if (client->driver->fini) client->driver->fini(client->object.priv); @@ -59,7 +59,7 @@ nvif_client_fini(struct nvif_client *client) } int -nvif_client_init(struct nvif_client *parent, const char *name, u64 device, +nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device, struct nvif_client *client) { struct nvif_client_v0 args = { .device = device }; @@ -70,8 +70,9 @@ nvif_client_init(struct nvif_client *parent, const char *name, u64 device, int ret; strncpy(args.name, name, sizeof(args.name)); - ret = nvif_object_init(parent != client ? &parent->object : NULL, - 0, NVIF_CLASS_CLIENT, &args, sizeof(args), + ret = nvif_object_ctor(parent != client ? &parent->object : NULL, + name ? name : "nvifClient", 0, + NVIF_CLASS_CLIENT, &args, sizeof(args), &client->object); if (ret) return ret; @@ -88,6 +89,6 @@ nvif_client_init(struct nvif_client *parent, const char *name, u64 device, } if (ret) - nvif_client_fini(client); + nvif_client_dtor(client); return ret; } |