| .. | .. |
|---|
| 48 | 48 | } |
|---|
| 49 | 49 | |
|---|
| 50 | 50 | void |
|---|
| 51 | | -nvif_client_fini(struct nvif_client *client) |
|---|
| 51 | +nvif_client_dtor(struct nvif_client *client) |
|---|
| 52 | 52 | { |
|---|
| 53 | | - nvif_object_fini(&client->object); |
|---|
| 53 | + nvif_object_dtor(&client->object); |
|---|
| 54 | 54 | if (client->driver) { |
|---|
| 55 | 55 | if (client->driver->fini) |
|---|
| 56 | 56 | client->driver->fini(client->object.priv); |
|---|
| .. | .. |
|---|
| 59 | 59 | } |
|---|
| 60 | 60 | |
|---|
| 61 | 61 | int |
|---|
| 62 | | -nvif_client_init(struct nvif_client *parent, const char *name, u64 device, |
|---|
| 62 | +nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device, |
|---|
| 63 | 63 | struct nvif_client *client) |
|---|
| 64 | 64 | { |
|---|
| 65 | 65 | struct nvif_client_v0 args = { .device = device }; |
|---|
| .. | .. |
|---|
| 70 | 70 | int ret; |
|---|
| 71 | 71 | |
|---|
| 72 | 72 | strncpy(args.name, name, sizeof(args.name)); |
|---|
| 73 | | - ret = nvif_object_init(parent != client ? &parent->object : NULL, |
|---|
| 74 | | - 0, NVIF_CLASS_CLIENT, &args, sizeof(args), |
|---|
| 73 | + ret = nvif_object_ctor(parent != client ? &parent->object : NULL, |
|---|
| 74 | + name ? name : "nvifClient", 0, |
|---|
| 75 | + NVIF_CLASS_CLIENT, &args, sizeof(args), |
|---|
| 75 | 76 | &client->object); |
|---|
| 76 | 77 | if (ret) |
|---|
| 77 | 78 | return ret; |
|---|
| .. | .. |
|---|
| 88 | 89 | } |
|---|
| 89 | 90 | |
|---|
| 90 | 91 | if (ret) |
|---|
| 91 | | - nvif_client_fini(client); |
|---|
| 92 | + nvif_client_dtor(client); |
|---|
| 92 | 93 | return ret; |
|---|
| 93 | 94 | } |
|---|