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:37:36 +1000 |
commit | 29cdc9107aeb62faf8f9a82229efc8a47303b802 (patch) | |
tree | 3dee21b16c5c7e585a5147726670aa86dd0e9545 /lib | |
parent | 316d65660a75c0de4c45e0f7ba110c4aa9362862 (diff) | |
download | nouveau-29cdc9107aeb62faf8f9a82229efc8a47303b802.tar.gz |
client: tidy ctor/dtor interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/main.c | 8 | ||||
-rw-r--r-- | lib/null.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/lib/main.c b/lib/main.c index 4a2c3152a..3a71da75c 100644 --- a/lib/main.c +++ b/lib/main.c @@ -258,11 +258,9 @@ os_client_suspend(void *priv) static void os_client_fini(void *priv) { - struct nvkm_object *object = priv; + struct nvkm_client *client = priv; - nvkm_client_fini(nv_client(object), false); - atomic_set(&object->refcount, 1); - nvkm_object_ref(NULL, &object); + nvkm_client_del(&client); mutex_lock(&os_mutex); if (--os_client_nr == 0) @@ -282,7 +280,7 @@ os_client_init(const char *name, u64 device, const char *cfg, os_init(cfg, dbg, true); mutex_unlock(&os_mutex); - ret = nvkm_client_create(name, device, cfg, dbg, &client); + ret = nvkm_client_new(name, device, cfg, dbg, &client); *ppriv = client; if (ret == 0) client->ntfy = nvif_notify; diff --git a/lib/null.c b/lib/null.c index 412d94050..2bb073441 100644 --- a/lib/null.c +++ b/lib/null.c @@ -91,11 +91,9 @@ null_client_suspend(void *priv) static void null_client_fini(void *priv) { - struct nvkm_object *object = priv; + struct nvkm_client *client = priv; - nvkm_client_fini(nv_client(object), false); - atomic_set(&object->refcount, 1); - nvkm_object_ref(NULL, &object); + nvkm_client_del(&client); mutex_lock(&null_mutex); if (--null_client_nr == 0) @@ -115,7 +113,7 @@ null_client_init(const char *name, u64 device, const char *cfg, null_init(cfg, dbg, true); mutex_unlock(&null_mutex); - ret = nvkm_client_create(name, ~0ULL, cfg, dbg, &client); + ret = nvkm_client_new(name, ~0ULL, cfg, dbg, &client); *ppriv = client; if (ret == 0) client->ntfy = nvif_notify; |